@Newify AST transform.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private static final String | |
| private DeclarationExpression | |
| private ListExpression | |
| private Pattern | |
| private static final Pattern | |
| private static final Class | |
| private static final String | |
| private static final ClassNode | |
| private static Map | |
| private Map | |
| private SourceUnit |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| private static boolean | |
| private ListExpression | determineClasses(Expression expr, boolean searchSourceUnit)
allow non-strict mode in scripts because parsing not complete at that point |
| private Pattern | |
| public static String | |
| private boolean | |
| private ClassNode | |
| protected SourceUnit | |
| private ClassNode | |
| private boolean | |
| private static void | |
| private boolean | |
| private static boolean | |
| private void | |
| private void | newifyDeclaration(DeclarationExpression de, boolean autoFlag, ListExpression list, final Pattern cnPattern)
|
| private void | newifyMethodOrField(AnnotatedNode parent, boolean autoFlag, ListExpression list, final Pattern cnPattern)
|
| private boolean | |
| public Expression | transform(Expression expr)
Overrides org. Implements org. |
| private Expression | |
| public void | visit(ASTNode[]
The ASTnodes when the call was triggered. Element 0 is the AnnotationNode that triggered this
annotation to be activated. Element 1 is the AnnotatedNode decorated, such as a MethodNode or ClassNode. For
global transformations it is usually safe to ignore this parameter. nodes, SourceUnit The source unit being compiled. The source unit may contain several classes. For global transformations,
information about the AST can be retrieved from this object. source)Implements org. |
| auto | back to summary |
|---|---|
| private boolean auto | |
| BASE_BAD_PARAM_ERROR | back to summary |
|---|---|
| private static final String BASE_BAD_PARAM_ERROR | |
| candidate | back to summary |
|---|---|
| private DeclarationExpression candidate | |
| classesToNewify | back to summary |
|---|---|
| private ListExpression classesToNewify | |
| classNamePattern | back to summary |
|---|---|
| private Pattern classNamePattern | |
| extractNamePattern | back to summary |
|---|---|
| private static final Pattern extractNamePattern | |
| globalClasses | back to summary |
|---|---|
| private static final Class<T>[] globalClasses | |
| MY_NAME | back to summary |
|---|---|
| private static final String MY_NAME | |
| MY_TYPE | back to summary |
|---|---|
| private static final ClassNode MY_TYPE | |
| nameToGlobalClassesNodesMap | back to summary |
|---|---|
| private static Map<String, ClassNode> nameToGlobalClassesNodesMap | |
| nameToInnerClassesNodesMap | back to summary |
|---|---|
| private Map<String, NewifyASTTransformation. | |
| source | back to summary |
|---|---|
| private SourceUnit source | |
| NewifyASTTransformation | back to summary |
|---|---|
| public NewifyASTTransformation() | |
| checkAutoClash | back to summary |
|---|---|
| private void checkAutoClash(boolean autoFlag, AnnotatedNode parent) | |
| checkClassLevelClashes | back to summary |
|---|---|
| private void checkClassLevelClashes(ListExpression list) | |
| checkDuplicateNameClashes | back to summary |
|---|---|
| private void checkDuplicateNameClashes(ListExpression list) | |
| determineAutoFlag | back to summary |
|---|---|
| private static boolean determineAutoFlag(Expression autoExpr) | |
| determineClasses | back to summary |
|---|---|
| private ListExpression determineClasses(Expression expr, boolean searchSourceUnit) allow non-strict mode in scripts because parsing not complete at that point | |
| determineClassNamePattern | back to summary |
|---|---|
| private Pattern determineClassNamePattern(Expression expr) | |
| extractName | back to summary |
|---|---|
| public static String extractName(final String s) | |
| findClassWithMatchingBasename | back to summary |
|---|---|
| private boolean findClassWithMatchingBasename(String nameWithoutPackage) | |
| findMatchingCandidateClass | back to summary |
|---|---|
| private ClassNode findMatchingCandidateClass(MethodCallExpression mce) | |
| getSourceUnit | back to summary |
|---|---|
| protected SourceUnit getSourceUnit() Implements abstract org. | |
| getSourceUnitClass | back to summary |
|---|---|
| private ClassNode getSourceUnitClass(VariableExpression ve) | |
| hasClassesToNewify | back to summary |
|---|---|
| private boolean hasClassesToNewify() | |
| internalError | back to summary |
|---|---|
| private static void internalError(String message) | |
| isNewifyCandidate | back to summary |
|---|---|
| private boolean isNewifyCandidate(MethodCallExpression mce) | |
| isNewMethodStyle | back to summary |
|---|---|
| private static boolean isNewMethodStyle(MethodCallExpression mce) | |
| newifyClass | back to summary |
|---|---|
| private void newifyClass(ClassNode cNode, boolean autoFlag, ListExpression list, final Pattern cnPattern) | |
| newifyDeclaration | back to summary |
|---|---|
| private void newifyDeclaration(DeclarationExpression de, boolean autoFlag, ListExpression list, final Pattern cnPattern) | |
| newifyMethodOrField | back to summary |
|---|---|
| private void newifyMethodOrField(AnnotatedNode parent, boolean autoFlag, ListExpression list, final Pattern cnPattern) | |
| shouldTransform | back to summary |
|---|---|
| private boolean shouldTransform(DeclarationExpression exp) | |
| transform | back to summary |
|---|---|
| public Expression transform(Expression expr) Overrides org. Implements org. Doc from org. Transforms the given expression into another expression | |
| transformMethodCall | back to summary |
|---|---|
| private Expression transformMethodCall(MethodCallExpression mce, Expression argsExp) | |
| visit | back to summary |
|---|---|
| public void visit(ASTNode[] nodes, SourceUnit source) Implements org. Doc from org. The method is invoked when an AST Transformation is active. For local transformations, it is invoked once each time the local annotation is encountered. For global transformations, it is invoked once for every source unit, which is typically a source file.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final String | |
| pack-priv final ClassNode | |
| pack-priv List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| name | back to summary |
|---|---|
| pack-priv final String name | |
| type | back to summary |
|---|---|
| pack-priv final ClassNode type | |
| types | back to summary |
|---|---|
| pack-priv List<ClassNode> types | |
| NewifyClassData | back to summary |
|---|---|
| public NewifyClassData(final String name, final ClassNode type) | |
| addAdditionalType | back to summary |
|---|---|
| public void addAdditionalType(final ClassNode additionalType) | |