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

Print this page




  23  * have any questions.
  24  */
  25 
  26 package com.sun.tools.apt.mirror.declaration;
  27 
  28 
  29 import java.util.Collection;
  30 import java.util.ArrayList;
  31 
  32 import com.sun.mirror.declaration.*;
  33 import com.sun.mirror.util.DeclarationVisitor;
  34 import com.sun.tools.apt.mirror.AptEnv;
  35 import com.sun.tools.javac.code.Symbol;
  36 import com.sun.tools.javac.code.Symbol.ClassSymbol;
  37 import com.sun.tools.javac.code.Type;
  38 
  39 
  40 /**
  41  * Implementation of MemberDeclaration
  42  */
  43 
  44 public abstract class MemberDeclarationImpl extends DeclarationImpl
  45                                             implements MemberDeclaration {
  46 
  47     protected MemberDeclarationImpl(AptEnv env, Symbol sym) {
  48         super(env, sym);
  49     }
  50 
  51 
  52     /**
  53      * {@inheritDoc}
  54      */
  55     public TypeDeclaration getDeclaringType() {
  56         ClassSymbol c = getDeclaringClassSymbol();
  57         return (c == null)
  58             ? null
  59             : env.declMaker.getTypeDeclaration(c);
  60     }
  61 
  62     /**
  63      * {@inheritDoc}




  23  * have any questions.
  24  */
  25 
  26 package com.sun.tools.apt.mirror.declaration;
  27 
  28 
  29 import java.util.Collection;
  30 import java.util.ArrayList;
  31 
  32 import com.sun.mirror.declaration.*;
  33 import com.sun.mirror.util.DeclarationVisitor;
  34 import com.sun.tools.apt.mirror.AptEnv;
  35 import com.sun.tools.javac.code.Symbol;
  36 import com.sun.tools.javac.code.Symbol.ClassSymbol;
  37 import com.sun.tools.javac.code.Type;
  38 
  39 
  40 /**
  41  * Implementation of MemberDeclaration
  42  */
  43 @SuppressWarnings("deprecation")
  44 public abstract class MemberDeclarationImpl extends DeclarationImpl
  45                                             implements MemberDeclaration {
  46 
  47     protected MemberDeclarationImpl(AptEnv env, Symbol sym) {
  48         super(env, sym);
  49     }
  50 
  51 
  52     /**
  53      * {@inheritDoc}
  54      */
  55     public TypeDeclaration getDeclaringType() {
  56         ClassSymbol c = getDeclaringClassSymbol();
  57         return (c == null)
  58             ? null
  59             : env.declMaker.getTypeDeclaration(c);
  60     }
  61 
  62     /**
  63      * {@inheritDoc}