Package com.strobel.decompiler.patterns
Class Pattern
- java.lang.Object
-
- com.strobel.decompiler.patterns.Pattern
-
- All Implemented Interfaces:
INode
- Direct Known Subclasses:
AllMatch
,AnyNode
,AssignmentChain
,AstTypeMatch
,BackReference
,Choice
,DeclaredVariableBackReference
,IdentifierBackReference
,IdentifierExpressionRegexNode
,LeftmostBinaryOperandNode
,MemberReferenceExpressionRegexNode
,MemberReferenceTypeNode
,NamedNode
,OptionalNode
,ParameterReferenceNode
,Repeat
,SingleOrBinaryAggregateNode
,SubtreeMatch
,TypedExpression
,TypedLiteralNode
,TypedNode
public abstract class Pattern extends java.lang.Object implements INode
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ANY_STRING
-
Fields inherited from interface com.strobel.decompiler.patterns.INode
CHILD_ITERATOR
-
-
Constructor Summary
Constructors Constructor Description Pattern()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description INode
getFirstChild()
INode
getNextSibling()
Role<?>
getRole()
boolean
isNull()
Match
match(INode other)
boolean
matches(INode other)
abstract boolean
matches(INode other, Match match)
static boolean
matchesCollection(Role<?> role, INode firstPatternChild, INode firstOtherChild, Match match)
boolean
matchesCollection(Role<?> role, INode position, Match match, BacktrackingInfo backtrackingInfo)
static boolean
matchString(java.lang.String pattern, java.lang.String text)
BlockStatement
toBlockStatement()
CatchClause
toCatchClause()
Expression
toExpression()
MethodDeclaration
toMethodDeclaration()
AstNode
toNode()
ParameterDeclaration
toParameterDeclaration()
Statement
toStatement()
AstType
toType()
VariableInitializer
toVariableInitializer()
-
-
-
Field Detail
-
ANY_STRING
public static final java.lang.String ANY_STRING
- See Also:
- Constant Field Values
-
-
Method Detail
-
matchString
public static boolean matchString(java.lang.String pattern, java.lang.String text)
-
toNode
public final AstNode toNode()
-
toExpression
public final Expression toExpression()
-
toStatement
public final Statement toStatement()
-
toBlockStatement
public final BlockStatement toBlockStatement()
-
toCatchClause
public final CatchClause toCatchClause()
-
toVariableInitializer
public final VariableInitializer toVariableInitializer()
-
toParameterDeclaration
public final ParameterDeclaration toParameterDeclaration()
-
toMethodDeclaration
public final MethodDeclaration toMethodDeclaration()
-
toType
public final AstType toType()
-
getFirstChild
public INode getFirstChild()
- Specified by:
getFirstChild
in interfaceINode
-
getNextSibling
public INode getNextSibling()
- Specified by:
getNextSibling
in interfaceINode
-
matchesCollection
public boolean matchesCollection(Role<?> role, INode position, Match match, BacktrackingInfo backtrackingInfo)
- Specified by:
matchesCollection
in interfaceINode
-
-