com.sun.enterprise.admin.cli
Class ArgumentTokenizer

java.lang.Object
  extended by com.sun.enterprise.admin.cli.ArgumentTokenizer

public class ArgumentTokenizer
extends Object


Nested Class Summary
static class ArgumentTokenizer.ArgumentException
           
 
Field Summary
protected  int currentPosition
           
protected  int maxPosition
           
protected  String str
           
protected  StringBuilder token
           
 
Constructor Summary
ArgumentTokenizer(String str)
          Construct a tokenizer for the specified string.
 
Method Summary
 boolean hasMoreTokens()
          Test if there are more tokens available from this tokenizer's string.
 String nextToken()
          Return the next token from this tokenizer.
protected  String scanToken()
          Return the next token starting at the current position, assuming whitespace has already been skipped.
protected  void skipWhiteSpace()
          Skip white space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentPosition

protected int currentPosition

maxPosition

protected int maxPosition

str

protected String str

token

protected StringBuilder token
Constructor Detail

ArgumentTokenizer

public ArgumentTokenizer(String str)
Construct a tokenizer for the specified string.

Parameters:
str - a string to be parsed.
Method Detail

skipWhiteSpace

protected void skipWhiteSpace()
Skip white space.


hasMoreTokens

public boolean hasMoreTokens()
Test if there are more tokens available from this tokenizer's string.

Returns:
true if there are more tokens available from this tokenizer's string; false otherwise.

nextToken

public String nextToken()
                 throws ArgumentTokenizer.ArgumentException
Return the next token from this tokenizer.

Returns:
the next token from this tokenizer.
Throws:
NoSuchElementException - if there are no more tokens in this tokenizer's string.
ArgumentTokenizer.ArgumentException

scanToken

protected String scanToken()
                    throws ArgumentTokenizer.ArgumentException
Return the next token starting at the current position, assuming whitespace has already been skipped.

Throws:
ArgumentTokenizer.ArgumentException


Copyright © 2012. All Rights Reserved.