1 7 8 package com.sun.mirror.type; 9 10 11 import java.lang.annotation.Annotation ; 12 import java.util.ArrayList ; 13 import java.util.Collection ; 14 import java.util.Collections ; 15 16 import com.sun.mirror.declaration.Declaration; 17 18 19 26 public class MirroredTypesException extends RuntimeException { 27 28 private static final long serialVersionUID = 1; 29 30 private transient Collection <TypeMirror> types; private Collection <String > names; 33 38 public MirroredTypesException(Collection <TypeMirror> types) { 39 super("Attempt to access Class objects for TypeMirrors " + types); 40 this.types = types; 41 names = new ArrayList (); 42 for (TypeMirror t : types) { 43 names.add(t.toString()); 44 } 45 } 46 47 54 public Collection <TypeMirror> getTypeMirrors() { 55 return (types != null) 56 ? Collections.unmodifiableCollection(types) 57 : null; 58 } 59 60 69 public Collection <String > getQualifiedNames() { 70 return Collections.unmodifiableCollection(names); 71 } 72 } 73 | Popular Tags |