Top Inners Constructors Methods
com.typesafe.config.impl

pack-priv final Class Tokenizer

extends Object
Class Inheritance
Imports
java.io.IOException, .Reader, java.util.ArrayList, .Iterator, .LinkedList, .List, .Queue, com.typesafe.config.ConfigException, .ConfigOrigin, .ConfigSyntax

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static String
asString(int codepoint)

pack-priv static String
pack-priv static Iterator<Token>
tokenize(ConfigOrigin origin, Reader input, ConfigSyntax flavor)

Tokenizes a Reader.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Tokenizerback to summary
pack-priv Tokenizer()

Method Detail

asStringback to summary
private static String asString(int codepoint)
renderback to summary
pack-priv static String render(Iterator<Token> tokens)
tokenizeback to summary
pack-priv static Iterator<Token> tokenize(ConfigOrigin origin, Reader input, ConfigSyntax flavor)

Tokenizes a Reader. Does not close the reader; you have to arrange to do that after you're done with the returned iterator.

com.typesafe.config.impl back to summary

private Class Tokenizer.ProblemException

extends Exception
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Token
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv Token

Field Detail

problemback to summary
private final Token problem
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Constructor Detail

ProblemExceptionback to summary
pack-priv ProblemException(Token problem)

Method Detail

problemback to summary
pack-priv Token problem()
com.typesafe.config.impl back to summary

private Class Tokenizer.TokenIterator

extends Object
implements Iterator<Token>
Class Inheritance
All Implemented Interfaces
java.util.Iterator

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final boolean
private final LinkedList<Integer>
pack-priv static final String
private final Reader
private int
private ConfigOrigin
pack-priv static final String
pack-priv static final String
private final SimpleConfigOrigin
private final Queue<Token>
private final Tokenizer.TokenIterator.WhitespaceSaver

Constructor Summary

AccessConstructor and Description
pack-priv
TokenIterator(ConfigOrigin origin, Reader input, boolean allowComments)

Method Summary

Modifier and TypeMethod and Description
private void
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

private static boolean
pack-priv static boolean
isWhitespace(int c)

pack-priv static boolean
private static ConfigOrigin
lineOrigin(ConfigOrigin baseOrigin, int lineNumber)

public Token
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

private int
private int
private Tokenizer.ProblemException
problem(String message)

private Tokenizer.ProblemException
problem(String what, String message)

private Tokenizer.ProblemException
problem(String what, String message, boolean suggestQuotes)

private Tokenizer.ProblemException
problem(String what, String message, Throwable cause)

private Tokenizer.ProblemException
problem(String what, String message, boolean suggestQuotes, Throwable cause)

private static Tokenizer.ProblemException
problem(ConfigOrigin origin, String what, String message, Throwable cause)

private static Tokenizer.ProblemException
problem(ConfigOrigin origin, String what, String message, boolean suggestQuotes, Throwable cause)

private static Tokenizer.ProblemException
problem(ConfigOrigin origin, String message)

private Token
pullComment(int firstChar)

private void
private Token
private Token
pullNumber(int firstChar)

private Token
private Token
private Token
private Token
private void
putBack(int c)

private void
public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allowCommentsback to summary
private final boolean allowComments
bufferback to summary
private final LinkedList<Integer> buffer
firstNumberCharsback to summary
pack-priv static final String firstNumberChars
inputback to summary
private final Reader input
lineNumberback to summary
private int lineNumber
lineOriginback to summary
private ConfigOrigin lineOrigin
notInUnquotedTextback to summary
pack-priv static final String notInUnquotedText
numberCharsback to summary
pack-priv static final String numberChars
originback to summary
private final SimpleConfigOrigin origin
tokensback to summary
private final Queue<Token> tokens
whitespaceSaverback to summary
private final Tokenizer.TokenIterator.WhitespaceSaver whitespaceSaver

Constructor Detail

TokenIteratorback to summary
pack-priv TokenIterator(ConfigOrigin origin, Reader input, boolean allowComments)

Method Detail

appendTripleQuotedStringback to summary
private void appendTripleQuotedString(StringBuilder sb, StringBuilder sbOrig) throws ProblemException
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
isSimpleValueback to summary
private static boolean isSimpleValue(Token t)
isWhitespaceback to summary
pack-priv static boolean isWhitespace(int c)
isWhitespaceNotNewlineback to summary
pack-priv static boolean isWhitespaceNotNewline(int c)
lineOriginback to summary
private static ConfigOrigin lineOrigin(ConfigOrigin baseOrigin, int lineNumber)
nextback to summary
public Token next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Token

the next element in the iteration

Annotations
@Override
nextCharAfterWhitespaceback to summary
private int nextCharAfterWhitespace(Tokenizer.TokenIterator.WhitespaceSaver saver)
nextCharRawback to summary
private int nextCharRaw()
problemback to summary
private Tokenizer.ProblemException problem(String message)
problemback to summary
private Tokenizer.ProblemException problem(String what, String message)
problemback to summary
private Tokenizer.ProblemException problem(String what, String message, boolean suggestQuotes)
problemback to summary
private Tokenizer.ProblemException problem(String what, String message, Throwable cause)
problemback to summary
private Tokenizer.ProblemException problem(String what, String message, boolean suggestQuotes, Throwable cause)
problemback to summary
private static Tokenizer.ProblemException problem(ConfigOrigin origin, String what, String message, Throwable cause)
problemback to summary
private static Tokenizer.ProblemException problem(ConfigOrigin origin, String what, String message, boolean suggestQuotes, Throwable cause)
problemback to summary
private static Tokenizer.ProblemException problem(ConfigOrigin origin, String message)
pullCommentback to summary
private Token pullComment(int firstChar)
pullEscapeSequenceback to summary
private void pullEscapeSequence(StringBuilder sb, StringBuilder sbOrig) throws ProblemException
pullNextTokenback to summary
private Token pullNextToken(Tokenizer.TokenIterator.WhitespaceSaver saver) throws ProblemException
pullNumberback to summary
private Token pullNumber(int firstChar) throws ProblemException
pullPlusEqualsback to summary
private Token pullPlusEquals() throws ProblemException
pullQuotedStringback to summary
private Token pullQuotedString() throws ProblemException
pullSubstitutionback to summary
private Token pullSubstitution() throws ProblemException
pullUnquotedTextback to summary
private Token pullUnquotedText()
putBackback to summary
private void putBack(int c)
queueNextTokenback to summary
private void queueNextToken() throws ProblemException
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override
startOfCommentback to summary
private boolean startOfComment(int c)
com.typesafe.config.impl back to summary

private Class Tokenizer.TokenIterator.WhitespaceSaver

extends Object
Class Inheritance
  • java.lang.Object
  • com.typesafe.config.impl.Tokenizer.TokenIterator.WhitespaceSaver

Field Summary

Modifier and TypeField and Description
private boolean
private StringBuilder

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
add(int c)

pack-priv Token
check(Token t, ConfigOrigin baseOrigin, int lineNumber)

private Token
createWhitespaceTokenFromSaver(ConfigOrigin baseOrigin, int lineNumber)

private Token
nextIsASimpleValue(ConfigOrigin baseOrigin, int lineNumber)

private Token
nextIsNotASimpleValue(ConfigOrigin baseOrigin, int lineNumber)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lastTokenWasSimpleValueback to summary
private boolean lastTokenWasSimpleValue
whitespaceback to summary
private StringBuilder whitespace

Constructor Detail

WhitespaceSaverback to summary
pack-priv WhitespaceSaver()

Method Detail

addback to summary
pack-priv void add(int c)
checkback to summary
pack-priv Token check(Token t, ConfigOrigin baseOrigin, int lineNumber)
createWhitespaceTokenFromSaverback to summary
private Token createWhitespaceTokenFromSaver(ConfigOrigin baseOrigin, int lineNumber)
nextIsASimpleValueback to summary
private Token nextIsASimpleValue(ConfigOrigin baseOrigin, int lineNumber)
nextIsNotASimpleValueback to summary
private Token nextIsNotASimpleValue(ConfigOrigin baseOrigin, int lineNumber)