1 22 package org.aspectj.tools.ajdoc; 23 24 import org.aspectj.ajdoc.IntroducedSuperDoc; 25 import org.aspectj.compiler.base.ast.Dec; 26 import org.aspectj.compiler.base.ast.TypeDs; 27 import org.aspectj.compiler.crosscuts.ast.IntroducedSuperDec; 28 29 import java.util.ArrayList ; 30 import java.util.Collection ; 31 import java.util.Collections ; 32 import java.util.List ; 33 34 public class IntroducedSuperDocImpl 35 extends IntroductionDocImpl 36 implements IntroducedSuperDoc { 37 38 39 private final IntroducedSuperDec introducedSuperDec; 40 41 42 private final Collection types; 43 44 public IntroducedSuperDocImpl(com.sun.javadoc.ClassDoc containingClass, 45 IntroducedSuperDec introducedSuperDec) { 46 super(containingClass); 47 this.introducedSuperDec = introducedSuperDec; 48 types = createTypes(); 49 } 50 51 protected Dec dec() { 52 return introducedSuperDec; 53 } 54 55 64 public boolean isImplements() { 65 return introducedSuperDec.getIsImplements(); 66 } 67 68 76 public org.aspectj.ajdoc.Type[] types() { 77 return (org.aspectj.ajdoc.Type[])types.toArray 78 (new org.aspectj.ajdoc.Type[types.size()]); 79 } 80 81 86 public String name() { if (true) return ""; return (introducedSuperDec.getTypeDs().size() != 0) 88 ? ((org.aspectj.ajdoc.Type)introducedSuperDec.getTypeDs(). 89 get(0).getType()).typeName() 90 : ""; 91 } 93 94 private final Collection createTypes() { 95 TypeDs typeds = introducedSuperDec.getTypeDs(); 96 if (typeds == null) return Collections.EMPTY_LIST; 97 List list = new ArrayList (); 98 for (int i = 0, N = typeds.size(); i < N; i++) { 99 list.add(ClassDocImpl.getInstance(typeds.get(i).getType().getTypeDec())); 100 } 101 return list; 102 } 103 } 104 | Popular Tags |