langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java
changeset 22163 3651128c74eb
parent 14258 8d2148961366
child 23394 45a10f396552
equal deleted inserted replaced
22162:3b3e23e67329 22163:3651128c74eb
    53     /*
    53     /*
    54      * Trusted constructor to be called by MirroredTypeException.
    54      * Trusted constructor to be called by MirroredTypeException.
    55      */
    55      */
    56     MirroredTypesException(String message, TypeMirror type) {
    56     MirroredTypesException(String message, TypeMirror type) {
    57         super(message);
    57         super(message);
    58         List<TypeMirror> tmp = (new ArrayList<TypeMirror>());
    58         List<TypeMirror> tmp = (new ArrayList<>());
    59         tmp.add(type);
    59         tmp.add(type);
    60         types = Collections.unmodifiableList(tmp);
    60         types = Collections.unmodifiableList(tmp);
    61     }
    61     }
    62 
    62 
    63     /**
    63     /**
    66      * @param types  the types being accessed
    66      * @param types  the types being accessed
    67      */
    67      */
    68     public MirroredTypesException(List<? extends TypeMirror> types) {
    68     public MirroredTypesException(List<? extends TypeMirror> types) {
    69         super("Attempt to access Class objects for TypeMirrors " +
    69         super("Attempt to access Class objects for TypeMirrors " +
    70               (types = // defensive copy
    70               (types = // defensive copy
    71                new ArrayList<TypeMirror>(types)).toString() );
    71                new ArrayList<>(types)).toString() );
    72         this.types = Collections.unmodifiableList(types);
    72         this.types = Collections.unmodifiableList(types);
    73     }
    73     }
    74 
    74 
    75     /**
    75     /**
    76      * Returns the type mirrors corresponding to the types being accessed.
    76      * Returns the type mirrors corresponding to the types being accessed.