src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationMirrorImpl.java

Print this page




  25 
  26 package com.sun.tools.apt.mirror.declaration;
  27 
  28 
  29 import java.util.LinkedHashMap;
  30 import java.util.Map;
  31 
  32 import com.sun.mirror.declaration.*;
  33 import com.sun.mirror.type.AnnotationType;
  34 import com.sun.mirror.util.SourcePosition;
  35 import com.sun.tools.apt.mirror.AptEnv;
  36 import com.sun.tools.javac.code.Attribute;
  37 import com.sun.tools.javac.code.Symbol.*;
  38 import com.sun.tools.javac.util.Name;
  39 import com.sun.tools.javac.util.Pair;
  40 
  41 
  42 /**
  43  * Implementation of AnnotationMirror
  44  */
  45 
  46 public class AnnotationMirrorImpl implements AnnotationMirror {
  47 
  48     protected final AptEnv env;
  49     protected final Attribute.Compound anno;
  50     protected final Declaration decl;
  51 
  52 
  53     AnnotationMirrorImpl(AptEnv env, Attribute.Compound anno, Declaration decl) {
  54         this.env = env;
  55         this.anno = anno;
  56         this.decl = decl;
  57     }
  58 
  59 
  60     /**
  61      * Returns a string representation of this annotation.
  62      * String is of one of the forms:
  63      *     @com.example.foo(name1=val1, name2=val2)
  64      *     @com.example.foo(val)
  65      *     @com.example.foo




  25 
  26 package com.sun.tools.apt.mirror.declaration;
  27 
  28 
  29 import java.util.LinkedHashMap;
  30 import java.util.Map;
  31 
  32 import com.sun.mirror.declaration.*;
  33 import com.sun.mirror.type.AnnotationType;
  34 import com.sun.mirror.util.SourcePosition;
  35 import com.sun.tools.apt.mirror.AptEnv;
  36 import com.sun.tools.javac.code.Attribute;
  37 import com.sun.tools.javac.code.Symbol.*;
  38 import com.sun.tools.javac.util.Name;
  39 import com.sun.tools.javac.util.Pair;
  40 
  41 
  42 /**
  43  * Implementation of AnnotationMirror
  44  */
  45 @SuppressWarnings("deprecation")
  46 public class AnnotationMirrorImpl implements AnnotationMirror {
  47 
  48     protected final AptEnv env;
  49     protected final Attribute.Compound anno;
  50     protected final Declaration decl;
  51 
  52 
  53     AnnotationMirrorImpl(AptEnv env, Attribute.Compound anno, Declaration decl) {
  54         this.env = env;
  55         this.anno = anno;
  56         this.decl = decl;
  57     }
  58 
  59 
  60     /**
  61      * Returns a string representation of this annotation.
  62      * String is of one of the forms:
  63      *     @com.example.foo(name1=val1, name2=val2)
  64      *     @com.example.foo(val)
  65      *     @com.example.foo