private void verifyExtensionInterfaces( JCTree.JCClassDecl tree ) { if( !hasAnnotation( tree.getModifiers().getAnnotations(), Extension.class ) ) { return; } outer: for( JCExpression iface: tree.getImplementsClause() ) { final Symbol.TypeSymbol ifaceSym = iface.type.tsym; if( ifaceSym == _tp.getSymtab().objectType.tsym ) { continue; } for( Attribute.Compound anno: ifaceSym.getAnnotationMirrors() ) { if( anno.type.toString().equals( Structural.class.getName() ) ) { continue outer; } } // extension interfaces must be structural _tp.report( iface, Diagnostic.Kind.ERROR, ExtIssueMsg.MSG_ONLY_STRUCTURAL_INTERFACE_ALLOWED_HERE.get( iface.toString() ) ); } }
private void verifyExtensionInterfaces( JCTree.JCClassDecl tree ) { if( !hasAnnotation( tree.getModifiers().getAnnotations(), Extension.class ) ) { return; } outer: for( JCExpression iface: tree.getImplementsClause() ) { final Symbol.TypeSymbol ifaceSym = iface.type.tsym; if( ifaceSym == _tp.getSymtab().objectType.tsym ) { continue; } for( Attribute.Compound anno: ifaceSym.getAnnotationMirrors() ) { if( anno.type.toString().equals( Structural.class.getName() ) ) { continue outer; } } // extension interfaces must be structural _tp.report( iface, Diagnostic.Kind.ERROR, ExtIssueMsg.MSG_ONLY_STRUCTURAL_INTERFACE_ALLOWED_HERE.get( iface.toString() ) ); } }
analyzeSimpleExpressions(context, classDecl.getImplementsClause());
EstimatorFactory.implementz(oldT.getImplementsClause(), newT.getImplementsClause(), diffContext) : EstimatorFactory.extendz(oldT.getImplementsClause(), newT.getImplementsClause(), diffContext); if (!newT.implementing.isEmpty()) copyTo(localPointer, insertHint);
analyzeSimpleExpressions(context, classDecl.getImplementsClause());
@Override public void visitClassDef(JCClassDecl tree) { List<JCTree> supertypes = List.nil(); if (tree.getExtendsClause() != null) { supertypes = supertypes.prepend(tree.getExtendsClause()); } if (tree.getImplementsClause() != null) { for (JCTree intf : tree.getImplementsClause()) { supertypes = supertypes.prepend(intf); } } checkClass(tree.pos(), tree.sym, supertypes); }
@Override public void visitClassDef(JCClassDecl tree) { List<JCTree> supertypes = List.nil(); if (tree.getExtendsClause() != null) { supertypes = supertypes.prepend(tree.getExtendsClause()); } if (tree.getImplementsClause() != null) { for (JCTree intf : tree.getImplementsClause()) { supertypes = supertypes.prepend(intf); } } checkClass(tree.pos(), tree.sym, supertypes); }