public class RegExpLiteralNode extends LiteralNode implements IRegExpLiteralNode
IRegExpLiteralNode.RegExpFlag
ILiteralNode.LiteralType
type, value
emptyNodeArray, parent
UNKNOWN
Modifier | Constructor and Description |
---|---|
|
RegExpLiteralNode(ASToken t,
IProblemReporter reporter)
Constructor.
|
protected |
RegExpLiteralNode(RegExpLiteralNode other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
protected RegExpLiteralNode |
copy()
Copy the ExpressionNodeBase and its subtree.
|
Set<IRegExpLiteralNode.RegExpFlag> |
getFlags()
Returns a set of flags that are set on this regular expression, or an
empty set
|
String |
getFlagString()
Returns a String of flags that are set on this regular expression, or an
empty String
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
String |
getValue()
Returns the value of this literal as a String
|
String |
getValue(boolean rawValue)
Returns the value of this literal as a String
|
boolean |
hasFlag(IRegExpLiteralNode.RegExpFlag flag)
Determines if a specific flag is set on this regular expression
|
buildInnerString, getLiteralType, isDynamicExpression, isSynthetic, isTerminal, normalize, resolveType, setSynthetic
computeNamespaceReference, copyForInitializer, getASScope, getBaseExpression, getDecorationNode, getDependencyType, getMName, getParentExpression, hasParenthesis, inFilter, inWith, isPackageReference, resolve, setHasParenthesis
analyze, buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, fillInOffsets, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getChild, getChildCount, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getParent, getScopeNode, getSpanningStart, getStart, getSucceedingNode, getWorkspace, isTransparent, looselyContains, replaceChild, runPostProcess, setChildren, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, swapChildren, toString, tryGetOffsetLookup, verify
getColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, span
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLiteralType
copyForInitializer, hasParenthesis, isDynamicExpression, resolve, resolveType
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
public RegExpLiteralNode(ASToken t, IProblemReporter reporter)
t
- The token representing the RegExp literal.reporter
- The object used for reporting compiler problems.protected RegExpLiteralNode(RegExpLiteralNode other)
other
- The node to copy.public ASTNodeID getNodeID()
IASNode
getNodeID
in interface IASNode
getNodeID
in class LiteralNode
protected RegExpLiteralNode copy()
ExpressionNodeBase
copy
in class LiteralNode
public String getValue()
ILiteralNode
getValue
in interface ILiteralNode
getValue
in class LiteralNode
public String getValue(boolean rawValue)
ILiteralNode
getValue
in interface ILiteralNode
getValue
in class LiteralNode
rawValue
- True if you want the raw value, otherwise some massaging
of the value will be done before returning the value if it's a String
(enclosing quotes will be removed).public Set<IRegExpLiteralNode.RegExpFlag> getFlags()
IRegExpLiteralNode
getFlags
in interface IRegExpLiteralNode
IRegExpLiteralNode.RegExpFlag
optionspublic String getFlagString()
IRegExpLiteralNode
getFlagString
in interface IRegExpLiteralNode
IRegExpLiteralNode.RegExpFlag
optionspublic boolean hasFlag(IRegExpLiteralNode.RegExpFlag flag)
IRegExpLiteralNode
hasFlag
in interface IRegExpLiteralNode
flag
- the IRegExpLiteralNode.RegExpFlag
whose existence we are testing forCopyright © 2016 The Apache Software Foundation. All rights reserved.