|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.drjava.model.definitions.reducedmodel.ReducedToken
public abstract class ReducedToken
The representation of document text in the reduced model. ReducedToken :: = Brace | Gap
Field Summary |
---|
Fields inherited from interface edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates |
---|
FREE, INSIDE_BLOCK_COMMENT, INSIDE_DOUBLE_QUOTE, INSIDE_LINE_COMMENT, INSIDE_SINGLE_QUOTE, STUTTER |
Constructor Summary | |
---|---|
ReducedToken(ReducedModelState state)
|
Method Summary | |
---|---|
abstract void |
flip()
Return the opposite of this ReducedToken in the same state. |
int |
getHighlightState()
Returns whether the current char is highlighted. |
abstract int |
getSize()
Get the size of the token. |
ReducedModelState |
getState()
Get the shadowing state of the token. |
abstract String |
getType()
Get the type of the token. |
abstract void |
grow(int delta)
Increases the size of the gap. |
abstract boolean |
isBlockCommentEnd()
Determines whether the current location is the end of a block comment |
abstract boolean |
isBlockCommentStart()
Determines if current location is the beginning of a block comment |
abstract boolean |
isClosed()
Determines whether the current location is a closing parenthesis. |
abstract boolean |
isClosedBrace()
Determines whether the current location is a closed brace. |
boolean |
isCommentStart()
Determine whether this token is a comment start "brace" ("//" or "/*') |
abstract boolean |
isDoubleEscape()
Returns whether this is a double escape |
abstract boolean |
isDoubleEscapeSequence()
Returns whether this is a double escape sequence |
abstract boolean |
isDoubleQuote()
Returns whether this is a double quote |
abstract boolean |
isEscapedDoubleQuote()
Return whether this is an escaped double quote |
abstract boolean |
isEscapedSingleQuote()
Returns whether this is an escaped single quote |
abstract boolean |
isGap()
Determines whether the current location is within in gap. |
abstract boolean |
isLineComment()
Determines whether the current location is a line comment |
abstract boolean |
isMatch(edu.rice.cs.drjava.model.definitions.reducedmodel.Brace other)
Determine if the given token is a open/close match with this. |
abstract boolean |
isMatchable()
Return true iff this ReducedToken is a matchable, i.e. |
abstract boolean |
isMultipleCharBrace()
Determines whether the current location is part of a multiple char brace. |
abstract boolean |
isNewline()
Determines whether the current location is a new line. |
abstract boolean |
isOpen()
Determines whether the current location is an opening parenthesis. |
abstract boolean |
isOpenBrace()
Determines whether the current location is an open brace. |
boolean |
isQuoted()
Indicates whether this brace is inside quotes. |
boolean |
isShadowed()
Indicates whether this brace is shadowed. |
abstract boolean |
isSingleQuote()
Returns whether this is a single quote |
abstract boolean |
isSlash()
Returns whether the current location is a slash |
abstract boolean |
isStar()
Returns whether this is a star |
void |
setState(ReducedModelState state)
Set the shadowing state of the token. |
abstract void |
setType(String type)
Set the type of the token |
abstract void |
shrink(int delta)
Decreases the size of the gap. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReducedToken(ReducedModelState state)
Method Detail |
---|
public abstract int getSize()
public abstract String getType()
public abstract void setType(String type)
type
- a String representation of the new token typepublic abstract void flip()
public abstract boolean isMatch(edu.rice.cs.drjava.model.definitions.reducedmodel.Brace other)
other
- another ReducedToken
public abstract boolean isMatchable()
public ReducedModelState getState()
public int getHighlightState()
public void setState(ReducedModelState state)
state
- public abstract void grow(int delta)
delta
- public abstract void shrink(int delta)
delta
- public boolean isShadowed()
public boolean isQuoted()
public abstract boolean isMultipleCharBrace()
public abstract boolean isGap()
public abstract boolean isLineComment()
public abstract boolean isBlockCommentStart()
public abstract boolean isBlockCommentEnd()
public abstract boolean isNewline()
public abstract boolean isSlash()
public abstract boolean isStar()
public abstract boolean isDoubleQuote()
public abstract boolean isSingleQuote()
public abstract boolean isDoubleEscapeSequence()
public abstract boolean isDoubleEscape()
public abstract boolean isEscapedSingleQuote()
public abstract boolean isEscapedDoubleQuote()
public abstract boolean isOpen()
public abstract boolean isClosed()
public abstract boolean isOpenBrace()
public abstract boolean isClosedBrace()
public boolean isCommentStart()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |