src/share/classes/com/sun/tools/javac/tree/JCTree.java

Print this page




2282         }
2283         @Override
2284         public <R,D> R accept(TreeVisitor<R,D> v, D d) {
2285             throw new AssertionError("TypeBoundKind is not part of a public API");
2286         }
2287         @Override
2288         public Tag getTag() {
2289             return TYPEBOUNDKIND;
2290         }
2291     }
2292 
2293     public static class JCAnnotation extends JCExpression implements AnnotationTree {
2294         // Either Tag.ANNOTATION or Tag.TYPE_ANNOTATION
2295         private Tag tag;
2296 
2297         public JCTree annotationType;
2298         public List<JCExpression> args;
2299 
2300         // Attribute.Compound if tag is ANNOTATION
2301         // Attribute.TypeCompound if tag is TYPE_ANNOTATION



2302         public Attribute.Compound attribute;
2303 
2304         protected JCAnnotation(Tag tag, JCTree annotationType, List<JCExpression> args) {
2305             this.tag = tag;
2306             this.annotationType = annotationType;
2307             this.args = args;
2308         }
2309 
2310         @Override
2311         public void accept(Visitor v) { v.visitAnnotation(this); }
2312 
2313         public Kind getKind() { return TreeInfo.tagToKind(getTag()); }
2314 
2315         public JCTree getAnnotationType() { return annotationType; }
2316         public List<JCExpression> getArguments() {
2317             return args;
2318         }
2319         @Override
2320         public <R,D> R accept(TreeVisitor<R,D> v, D d) {
2321             return v.visitAnnotation(this, d);




2282         }
2283         @Override
2284         public <R,D> R accept(TreeVisitor<R,D> v, D d) {
2285             throw new AssertionError("TypeBoundKind is not part of a public API");
2286         }
2287         @Override
2288         public Tag getTag() {
2289             return TYPEBOUNDKIND;
2290         }
2291     }
2292 
2293     public static class JCAnnotation extends JCExpression implements AnnotationTree {
2294         // Either Tag.ANNOTATION or Tag.TYPE_ANNOTATION
2295         private Tag tag;
2296 
2297         public JCTree annotationType;
2298         public List<JCExpression> args;
2299 
2300         // Attribute.Compound if tag is ANNOTATION
2301         // Attribute.TypeCompound if tag is TYPE_ANNOTATION
2302         //
2303         // NOTE: This field is slated for removal in the future.  Do
2304         // not use it for anything new.
2305         public Attribute.Compound attribute;
2306 
2307         protected JCAnnotation(Tag tag, JCTree annotationType, List<JCExpression> args) {
2308             this.tag = tag;
2309             this.annotationType = annotationType;
2310             this.args = args;
2311         }
2312 
2313         @Override
2314         public void accept(Visitor v) { v.visitAnnotation(this); }
2315 
2316         public Kind getKind() { return TreeInfo.tagToKind(getTag()); }
2317 
2318         public JCTree getAnnotationType() { return annotationType; }
2319         public List<JCExpression> getArguments() {
2320             return args;
2321         }
2322         @Override
2323         public <R,D> R accept(TreeVisitor<R,D> v, D d) {
2324             return v.visitAnnotation(this, d);