站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

RelativePathParser - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.common.path
Class RelativePathParser

java.lang.Object
  extended byorg.jboss.portal.common.path.RelativePathParser

public class RelativePathParser
extends java.lang.Object

Utility class to pull parse a relative path.

Version:
$Revision: 5451 $
Author:
Julien Viet

Field Summary
private  int current
          The current index of parsing.
static int DOWN
          The recognized token is down.
private  int length
          The length value when a down token is recognized.
static int NONE
          The parser has reached the end of the stream.
private  int offset
          The offset value when a down token is recognized.
private  java.lang.String path
          The path being parsed.
private  int previous
          The current internal offset.
private static int STATE_BEGIN
           
private static int STATE_CHAR
           
private static int STATE_DOT
           
private static int STATE_DOT_DOT
           
static int UP
          The recognized token is up.
 
Constructor Summary
RelativePathParser(java.lang.String path)
           
 
Method Summary
 int getLength()
           
 int getOffset()
           
 int next()
          Read the next token available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_BEGIN

private static final int STATE_BEGIN
See Also:
Constant Field Values

STATE_DOT

private static final int STATE_DOT
See Also:
Constant Field Values

STATE_DOT_DOT

private static final int STATE_DOT_DOT
See Also:
Constant Field Values

STATE_CHAR

private static final int STATE_CHAR
See Also:
Constant Field Values

NONE

public static final int NONE
The parser has reached the end of the stream. The values returned by getOffset() and getLength() is undertermined.

See Also:
Constant Field Values

UP

public static final int UP
The recognized token is up. The values returned by getOffset() and getLength() is undertermined.

See Also:
Constant Field Values

DOWN

public static final int DOWN
The recognized token is down. The values returned by getOffset() and getLength() determine the token string value.

See Also:
Constant Field Values

path

private final java.lang.String path
The path being parsed.


current

private int current
The current index of parsing.


previous

private int previous
The current internal offset.


offset

private int offset
The offset value when a down token is recognized.


length

private int length
The length value when a down token is recognized.

Constructor Detail

RelativePathParser

public RelativePathParser(java.lang.String path)
Method Detail

next

public int next()
Read the next token available.

Returns:
the token type recognized which can be NONE, UP or DOWN.

getOffset

public int getOffset()

getLength

public int getLength()