Examples of visitClass()


Examples of org.codehaus.groovy.classgen.EnumVisitor.visitClass()

        addPhaseOperation(convert, Phases.CONVERSION);
        addPhaseOperation(new PrimaryClassNodeOperation() {
            public void call(SourceUnit source, GeneratorContext context,
                             ClassNode classNode) throws CompilationFailedException {
                EnumVisitor ev = new EnumVisitor(CompilationUnit.this, source);
                ev.visitClass(classNode);
            }
        }, Phases.CONVERSION);
        addPhaseOperation(resolve, Phases.SEMANTIC_ANALYSIS);
        addPhaseOperation(staticImport, Phases.SEMANTIC_ANALYSIS);
        addPhaseOperation(compileCompleteCheck, Phases.CANONICALIZATION);
View Full Code Here

Examples of org.codehaus.groovy.classgen.VariableScopeVisitor.visitClass()

       
        addPhaseOperation(new PrimaryClassNodeOperation() {
            public void call(SourceUnit source, GeneratorContext context, ClassNode node) throws CompilationFailedException {
                if (javaSources.size() != 0) {
                  VariableScopeVisitor scopeVisitor = new VariableScopeVisitor(source);
                  scopeVisitor.visitClass(node);
                  new JavaAwareResolveVisitor(JavaAwareCompilationUnit.this).startResolving(node,source);
                }
            }
        },Phases.CONVERSION);
View Full Code Here

Examples of org.codehaus.groovy.classgen.VariableScopeVisitor.visitClass()

       
        addPhaseOperation(new PrimaryClassNodeOperation() {
            public void call(SourceUnit source, GeneratorContext context, ClassNode node) throws CompilationFailedException {
                if (javaSources.size() != 0) {
                  VariableScopeVisitor scopeVisitor = new VariableScopeVisitor(source);
                  scopeVisitor.visitClass(node);
                  new JavaAwareResolveVisitor(JavaAwareCompilationUnit.this).startResolving(node,source);
                }
            }
        },Phases.CONVERSION);
View Full Code Here

Examples of org.codehaus.groovy.classgen.VariableScopeVisitor.visitClass()

    }
   
    public static void processVariableScopes(SourceUnit source, ClassNode classNode, MethodNode methodNode) {
        VariableScopeVisitor scopeVisitor = new VariableScopeVisitor(source);
        if(methodNode == null) {
            scopeVisitor.visitClass(classNode);
        } else {
            scopeVisitor.prepareVisit(classNode);
            scopeVisitor.visitMethod(methodNode);
        }
    }
View Full Code Here

Examples of org.codehaus.groovy.classgen.VariableScopeVisitor.visitClass()

    }

    private void resolveScope(final ClassNode cNode) {
        // we need to resolve again!
        VariableScopeVisitor scopeVisitor = new VariableScopeVisitor(unit);
        scopeVisitor.visitClass(cNode);
    }

    private void checkNoConstructor(final ClassNode cNode) {
        if (!cNode.getDeclaredConstructors().isEmpty()) {
            addError("Error processing trait '" + cNode.getName() + "'. " +
View Full Code Here

Examples of org.codehaus.groovy.classgen.VariableScopeVisitor.visitClass()

            super.visitClass(cNode);
            // GROOVY-5207 So that Closures can see newly added fields
            // (not super efficient for a very large class with many @Fields but we chose simplicity
            // and understandability of this solution over more complex but efficient alternatives)
            VariableScopeVisitor scopeVisitor = new VariableScopeVisitor(source);
            scopeVisitor.visitClass(cNode);
        }
    }

    private boolean acceptableTransform(AnnotationNode annotation) {
        // TODO also check for phase after sourceUnit.getPhase()? but will be ignored anyway?
View Full Code Here

Examples of org.codehaus.groovy.classgen.Verifier.visitClass()

            public void addCovariantMethods(ClassNode cn) {}
            protected void addTimeStamp(ClassNode node) {}
            protected void addInitialization(ClassNode node) {}
            public void visitProperty(PropertyNode node) {}           
        };
        verifier.visitClass(classNode);
       
        try {
            String packageName = classNode.getPackageName();
            if (packageName != null) {
                out.println("package " + packageName + ";\n");
View Full Code Here

Examples of org.codehaus.groovy.classgen.Verifier.visitClass()

            protected void addInitialization(ClassNode node) {}  
            protected void addPropertyMethod(MethodNode method) {
              propertyMethods.add(method);
            }
        };
        verifier.visitClass(classNode);
       
        try {
            String packageName = classNode.getPackageName();
            if (packageName != null) {
                out.println("package " + packageName + ";\n");
View Full Code Here

Examples of org.codehaus.groovy.classgen.Verifier.visitClass()

                @Override
                protected void addDefaultConstructor(ClassNode node) {
                    // not required for stub generation
                }
            };
            verifier.visitClass(classNode);
            currentModule = classNode.getModule();

            boolean isInterface = classNode.isInterface();
            boolean isEnum = (classNode.getModifiers() & Opcodes.ACC_ENUM) != 0;
            boolean isAnnotationDefinition = classNode.isAnnotationDefinition();
View Full Code Here

Examples of org.codehaus.groovy.classgen.Verifier.visitClass()

                 
                  propertyMethods.add(method);
                  propertyMethodsWithSigs.put(sig, method);
                }
            };
            verifier.visitClass(classNode);
            currentModule = classNode.getModule();

            boolean isInterface = classNode.isInterface();
            boolean isEnum = (classNode.getModifiers() & Opcodes.ACC_ENUM) !=0;
            boolean isAnnotationDefinition = classNode.isAnnotationDefinition();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.