com.sun.enterprise.admin.cli
Class ArgumentTokenizer

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

public class ArgumentTokenizer
extends java.lang.Object


Nested Class Summary
static class ArgumentTokenizer.ArgumentException
           
 
Field Summary
protected  int currentPosition
           
protected  int maxPosition
           
protected  java.lang.String str
           
private static LocalStringsImpl strings
           
protected  java.lang.StringBuilder token
           
 
Constructor Summary
ArgumentTokenizer(java.lang.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.
 java.lang.String nextToken()
          Return the next token from this tokenizer.
protected  java.lang.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 java.lang.String str

token

protected java.lang.StringBuilder token

strings

private static final LocalStringsImpl strings
Constructor Detail

ArgumentTokenizer

public ArgumentTokenizer(java.lang.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 java.lang.String nextToken()
                           throws ArgumentTokenizer.ArgumentException
Return the next token from this tokenizer.

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

scanToken

protected java.lang.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 GlassFish Community. All Rights Reserved.