Methods
Type Params |
Return Type |
Name and description |
|
static BinaryExpression |
andX(Expression lhv, Expression rhv)
|
|
static ArgumentListExpression |
args(Expression... expressions)
|
|
static ArgumentListExpression |
args(List<Expression> expressions)
|
|
static ArgumentListExpression |
args(Parameter[] parameters)
|
|
static ArgumentListExpression |
args(String... names)
|
|
static Statement |
assignNullS(Expression target)
|
|
static Statement |
assignS(Expression target, Expression value)
|
|
static Expression |
assignX(Expression target, Expression value)
|
|
static Expression |
attrX(Expression oe, Expression prop)
|
|
static BinaryExpression |
binX(Expression left, Token token, Expression right)
|
|
static BlockStatement |
block(VariableScope scope, Statement... stmts)
|
|
static BlockStatement |
block(VariableScope scope, List<Statement> stmts)
|
|
static BlockStatement |
block(Statement... stmts)
|
|
static BooleanExpression |
boolX(Expression expr)
|
|
static MethodCallExpression |
callSuperX(String methodName)
|
|
static MethodCallExpression |
callSuperX(String methodName, Expression args)
|
|
static MethodCallExpression |
callThisX(String methodName)
|
|
static MethodCallExpression |
callThisX(String methodName, Expression args)
|
|
static MethodCallExpression |
callX(Expression receiver, String methodName)
|
|
static MethodCallExpression |
callX(Expression receiver, String methodName, Expression args)
|
|
static MethodCallExpression |
callX(Expression receiver, Expression method, Expression args)
|
|
static StaticMethodCallExpression |
callX(ClassNode receiver, String methodName)
|
|
static StaticMethodCallExpression |
callX(ClassNode receiver, String methodName, Expression args)
|
|
static CastExpression |
castX(ClassNode type, Expression expression)
|
|
static CastExpression |
castX(ClassNode type, Expression expression, boolean ignoreAutoboxing)
|
|
static CatchStatement |
catchS(Parameter variable, Statement code)
|
|
static ListExpression |
classList2args(List<String> args)
|
|
static ClassExpression |
classX(ClassNode clazz)
|
|
static ClassExpression |
classX(Class clazz)
|
|
static Parameter[] |
cloneParams(Parameter[] source)
|
|
static ClosureExpression |
closureX(Parameter[] params, Statement code)
|
|
static ClosureExpression |
closureX(Statement code)
|
|
static BinaryExpression |
cmpX(Expression lhv, Expression rhv) Builds a binary expression that compares two values. |
|
static ConstantExpression |
constX(Object val)
|
|
static ConstantExpression |
constX(Object val, boolean keepPrimitive)
|
|
static String |
convertASTToSource(ReaderSource readerSource, ASTNode expression) Converts an expression into the String source. |
|
static void |
copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, List<AnnotationNode> copied, List<AnnotationNode> notCopied) Copies all candidateAnnotations with retention policy RetentionPolicy.RUNTIME
and RetentionPolicy.CLASS. |
|
static void |
copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, List<AnnotationNode> copied, List<AnnotationNode> notCopied, boolean includeGenerated) Copies all candidateAnnotations with retention policy RetentionPolicy.RUNTIME
and RetentionPolicy.CLASS.
|
|
static boolean |
copyStatementsWithSuperAdjustment(ClosureExpression pre, BlockStatement body)
|
|
static Statement |
createConstructorStatementDefault(FieldNode fNode)
|
|
static Statement |
ctorSuperS()
|
|
static Statement |
ctorSuperS(Expression args)
|
|
static ConstructorCallExpression |
ctorSuperX()
|
|
static ConstructorCallExpression |
ctorSuperX(Expression args)
|
|
static Statement |
ctorThisS()
|
|
static Statement |
ctorThisS(Expression args)
|
|
static ConstructorCallExpression |
ctorThisX()
|
|
static ConstructorCallExpression |
ctorThisX(Expression args)
|
|
static ConstructorCallExpression |
ctorX(ClassNode type, Expression args)
|
|
static ConstructorCallExpression |
ctorX(ClassNode type)
|
|
static Statement |
declS(Expression target, Expression init)
|
|
static DeclarationExpression |
declX(Expression target, Expression init)
|
|
static MapEntryExpression |
entryX(Expression key, Expression value)
|
|
static BinaryExpression |
eqX(Expression lhv, Expression rhv)
|
|
static BooleanExpression |
equalsNullX(Expression argExpr)
|
|
static FieldExpression |
fieldX(FieldNode fieldNode)
|
|
static FieldExpression |
fieldX(ClassNode owner, String fieldName)
|
|
static Expression |
findArg(String argName)
|
|
static List<MethodNode> |
getAllMethods(ClassNode type)
|
|
static List<PropertyNode> |
getAllProperties(ClassNode type)
|
|
static List<PropertyNode> |
getAllProperties(Set<String> names, ClassNode cNode, boolean includeProperties, boolean includeFields, boolean includePseudoGetters, boolean includePseudoSetters, boolean traverseSuperClasses, boolean skipReadonly)
|
|
static List<PropertyNode> |
getAllProperties(Set<String> names, ClassNode origType, ClassNode cNode, boolean includeProperties, boolean includeFields, boolean includePseudoGetters, boolean includePseudoSetters, boolean traverseSuperClasses, boolean skipReadonly)
|
|
static List<PropertyNode> |
getAllProperties(Set<String> names, ClassNode origType, ClassNode cNode, boolean includeProperties, boolean includeFields, boolean includePseudoGetters, boolean includePseudoSetters, boolean traverseSuperClasses, boolean skipReadonly, boolean reverse, boolean allNames, boolean includeStatic)
|
|
static String |
getGetterName(PropertyNode pNode)
|
|
static List<String> |
getInstanceNonPropertyFieldNames(ClassNode cNode)
|
|
static List<FieldNode> |
getInstanceNonPropertyFields(ClassNode cNode)
|
|
static List<PropertyNode> |
getInstanceProperties(ClassNode cNode)
|
|
static List<FieldNode> |
getInstancePropertyFields(ClassNode cNode)
|
|
static List<String> |
getInstancePropertyNames(ClassNode cNode)
|
|
static Set<ClassNode> |
getInterfacesAndSuperInterfaces(ClassNode type)
|
|
static String |
getSetterName(String name)
|
|
static List<FieldNode> |
getSuperNonPropertyFields(ClassNode cNode)
|
|
static List<FieldNode> |
getSuperPropertyFields(ClassNode cNode)
|
|
static Expression |
getterThisX(ClassNode annotatedNode, PropertyNode pNode) This method is similar to propX(Expression, Expression) but will make sure that if the property
being accessed is defined inside the classnode provided as a parameter, then a getter call is generated
instead of a field access. |
|
static Expression |
getterX(ClassNode annotatedNode, Expression receiver, PropertyNode pNode) This method is similar to propX(Expression, Expression) but will make sure that if the property
being accessed is defined inside the classnode provided as a parameter, then a getter call is generated
instead of a field access. |
|
static BinaryExpression |
hasClassX(Expression instance, ClassNode cNode)
|
|
static boolean |
hasDeclaredMethod(ClassNode cNode, String name, int argsCount)
|
|
static BinaryExpression |
hasEqualFieldX(FieldNode fNode, Expression other)
|
|
static BinaryExpression |
hasEqualPropertyX(ClassNode annotatedNode, PropertyNode pNode, VariableExpression other)
|
|
static BinaryExpression |
hasEqualPropertyX(PropertyNode pNode, Expression other)
|
|
static BooleanExpression |
hasSameFieldX(FieldNode fNode, Expression other)
|
|
static BooleanExpression |
hasSamePropertyX(PropertyNode pNode, Expression other)
|
|
static IfStatement |
ifElseS(Expression cond, Statement thenStmt, Statement elseStmt)
|
|
static Statement |
ifElseS$$bridge(Expression cond, Statement thenStmt, Statement elseStmt)
|
|
static IfStatement |
ifS(Expression cond, Expression trueExpr)
|
|
static IfStatement |
ifS(Expression cond, Statement trueStmt)
|
|
static Statement |
ifS$$bridge(Expression cond, Expression trueExpr)
|
|
static Statement |
ifS$$bridge(Expression cond, Statement trueStmt)
|
|
static boolean |
inSamePackage(ClassNode first, ClassNode second)
|
|
static boolean |
inSamePackage(Class first, Class second)
|
|
static Expression |
indexX(Expression target, Expression value)
|
|
static boolean |
isDefaultVisibility(int modifiers)
|
|
static BooleanExpression |
isInstanceOfX(Expression objectExpression, ClassNode cNode)
|
|
static BooleanExpression |
isNullX(Expression expr) Alias for equalsNullX(Expression) |
|
static BooleanExpression |
isOneX(Expression expr)
|
|
static boolean |
isOrImplements(ClassNode type, ClassNode interfaceType)
|
|
static BooleanExpression |
isTrueX(Expression argExpr)
|
|
static BooleanExpression |
isZeroX(Expression expr)
|
|
static ListExpression |
list2args(List args)
|
|
static ListExpression |
listX(List<Expression> args)
|
|
static VariableExpression |
localVarX(String name)
|
|
static VariableExpression |
localVarX(String name, ClassNode type)
|
|
static BinaryExpression |
ltX(Expression lhv, Expression rhv)
|
|
static String |
makeDescriptorWithoutReturnType(MethodNode mn) @deprecated use MethodNodeUtils#methodDescriptorWithoutReturnType(MethodNode) instead |
|
static MapExpression |
mapX(List<MapEntryExpression> expressions)
|
|
static BinaryExpression |
neX(Expression lhv, Expression rhv)
|
|
static BooleanExpression |
notNullX(Expression argExpr)
|
|
static NotExpression |
notX(Expression expr)
|
|
static ConstantExpression |
nullX()
|
|
static BinaryExpression |
orX(Expression lhv, Expression rhv)
|
|
static Parameter |
param(ClassNode type, String name)
|
|
static Parameter |
param(ClassNode type, String name, Expression initialExpression)
|
|
static Parameter[] |
params(Parameter... params)
|
|
static BinaryExpression |
plusX(Expression lhv, Expression rhv)
|
|
static Expression |
propX(Expression owner, String property)
|
|
static Expression |
propX(Expression owner, Expression property)
|
|
static PropertyExpression |
propX(Expression owner, Expression property, boolean safe)
|
|
static Statement |
returnS(Expression expr)
|
|
static Statement |
safeExpression(Expression fieldExpr, Expression expression)
|
|
static BooleanExpression |
sameX(Expression self, Expression other)
|
|
static Statement |
stmt(Expression expr)
|
|
static TernaryExpression |
ternaryX(Expression cond, Expression trueExpr, Expression elseExpr)
|
|
static PropertyExpression |
thisPropX(boolean implicit, String property)
|
|
static ThrowStatement |
throwS(Expression expr)
|
|
static TryCatchStatement |
tryCatchS(Statement tryStatement)
|
|
static TryCatchStatement |
tryCatchS(Statement tryStatement, Statement finallyStatement)
|
|
static VariableExpression |
varX(String name)
|
|
static VariableExpression |
varX(Variable variable)
|
|
static VariableExpression |
varX(String name, ClassNode type)
|