@Override public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException { if (!classNode.isSynthetic()) { GenericsVisitor genericsVisitor = new GenericsVisitor(source); genericsVisitor.visitClass(classNode); } } }, Phases.SEMANTIC_ANALYSIS);
/** * Checks whether the given {@link org.codehaus.groovy.ast.ClassNode} is a candidate * for applying interface contracts. * * @param type the {@link org.codehaus.groovy.ast.ClassNode} to be checked * @return whether the given <tt>type</tt> is a candidate for applying interface contract assertions */ public static boolean isInterfaceContractsCandidate(final ClassNode type) { return type != null && type.isInterface() && !type.isSynthetic() && !type.isEnum() && !type.isGenericsPlaceHolder() && !type.isScript() && !type.isScriptBody() && !isRuntimeClass(type); }
/** * Checks whether the given {@link org.codehaus.groovy.ast.ClassNode} is a candidate * for applying contracts. <p/> * * If the given class node has already been processed in this compilation run, this * method will return <tt>false</tt>. * * @param type the {@link org.codehaus.groovy.ast.ClassNode} to be checked * @return whether the given <tt>type</tt> is a candidate for applying contract assertions */ public static boolean isContractsCandidate(final ClassNode type) { return type != null && !type.isSynthetic() && !type.isInterface() && !type.isEnum() && !type.isGenericsPlaceHolder() && !type.isScript() && !type.isScriptBody() && !isRuntimeClass(type); }
public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException { if(!classNode.isSynthetic()) { GenericsVisitor genericsVisitor = new GenericsVisitor(source); genericsVisitor.visitClass(classNode);
if(!classNode.isSynthetic()) { GenericsVisitor genericsVisitor = new GenericsVisitor(source); genericsVisitor.visitClass(classNode);