@Override public void visitUses(JCUses tree) { Type st = attr.attribType(tree.qualid, env, syms.objectType); Symbol sym = TreeInfo.symbol(tree.qualid); if ((sym.flags() & ENUM) != 0) { log.error(tree.qualid.pos(), Errors.ServiceDefinitionIsEnum(st.tsym)); } else if (st.hasTag(CLASS)) { ClassSymbol service = (ClassSymbol) st.tsym; if (allUses.add(service)) { Directive.UsesDirective d = new Directive.UsesDirective(service); msym.uses = msym.uses.prepend(d); msym.directives = msym.directives.prepend(d); } else { log.error(tree.pos(), Errors.DuplicateUses(service)); } } }
@Override public void visitUses(JCUses tree) { Type st = attr.attribType(tree.qualid, env, syms.objectType); Symbol sym = TreeInfo.symbol(tree.qualid); if ((sym.flags() & ENUM) != 0) { log.error(tree.qualid.pos(), Errors.ServiceDefinitionIsEnum(st.tsym)); } else if (st.hasTag(CLASS)) { ClassSymbol service = (ClassSymbol) st.tsym; Directive.UsesDirective d = new Directive.UsesDirective(service); if (!allUses.add(d)) { log.error(tree.pos(), Errors.DuplicateUses(service)); } msym.uses = msym.uses.prepend(d); msym.directives = msym.directives.prepend(d); } }
protected int diffUses(JCUses oldT, JCUses newT, int[] bounds) { int localPointer = bounds[0]; // service int[] servBounds = getBounds(oldT.qualid); copyTo(localPointer, servBounds[0]); localPointer = diffTree(oldT.qualid, newT.qualid, servBounds); copyTo(localPointer, bounds[1]); return bounds[1]; }
@Override public void visitUses(JCUses tree) { }