protected static final class SubtreeSpecification.Parser extends Object
Constructor and Description |
---|
SubtreeSpecification.Parser(String value)
Create a new parser for a subtree specification string value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Determine if there are remaining tokens.
|
boolean |
hasNextRightBrace()
Determine if the next token is a right-brace character.
|
int |
nextInt()
Scans the next token of the input as a non-negative
int value. |
String |
nextKey()
Scans the next token of the input as a key value.
|
String |
nextName()
Scans the next token of the input as a name value.
|
void |
nextSpecificExclusions(Set<DN> chopBefore,
Set<DN> chopAfter)
Scans the next tokens of the input as a set of specific
exclusions encoded according to the SpecificExclusion
production in RFC 3672.
|
String |
nextStringValue()
Scans the next token of the input as a string quoted according
to the StringValue production in RFC 3641.
|
void |
skipColon()
Skip a colon separator.
|
void |
skipLeftBrace()
Skip a left-brace character.
|
void |
skipRightBrace()
Skip a right-brace character.
|
void |
skipSeparator()
Skip a comma separator.
|
public SubtreeSpecification.Parser(String value)
value
- The subtree specification string value.public boolean hasNext()
true
if and only if there are remaining
tokens.public boolean hasNextRightBrace()
true
if and only if the next token is a
valid right brace character.public int nextInt() throws InputMismatchException, NoSuchElementException
int
value.InputMismatchException
- If the next token is not a valid non-negative integer
string.NoSuchElementException
- If input is exhausted.public String nextKey() throws InputMismatchException, NoSuchElementException
InputMismatchException
- If the next token is not a valid key string.NoSuchElementException
- If input is exhausted.public String nextName() throws InputMismatchException, NoSuchElementException
A name is any string containing only alpha-numeric characters or hyphens, semi-colons, or underscores.
InputMismatchException
- If the next token is not a valid name string.NoSuchElementException
- If input is exhausted.public void nextSpecificExclusions(Set<DN> chopBefore, Set<DN> chopAfter) throws InputMismatchException, NoSuchElementException, DirectoryException
chopBefore
- The set of chop before local names.chopAfter
- The set of chop after local names.InputMismatchException
- If the common component did not have a valid syntax.NoSuchElementException
- If input is exhausted.DirectoryException
- If an error occurred when attempting to parse a
DN value.public String nextStringValue() throws InputMismatchException, NoSuchElementException
The return string has its outer double quotes removed and any escape inner double quotes unescaped.
InputMismatchException
- If the next token is not a valid string.NoSuchElementException
- If input is exhausted.public void skipColon() throws InputMismatchException, NoSuchElementException
InputMismatchException
- If the next token is not a colon separator character.NoSuchElementException
- If input is exhausted.public void skipLeftBrace() throws InputMismatchException, NoSuchElementException
InputMismatchException
- If the next token is not a left-brace character.NoSuchElementException
- If input is exhausted.public void skipRightBrace() throws InputMismatchException, NoSuchElementException
InputMismatchException
- If the next token is not a right-brace character.NoSuchElementException
- If input is exhausted.public void skipSeparator() throws InputMismatchException, NoSuchElementException
InputMismatchException
- If the next token is not a comma separator character.NoSuchElementException
- If input is exhausted.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.