Search in sources :

Example 1 with TypeMirrorImpl

use of com.sun.tools.apt.mirror.type.TypeMirrorImpl in project ceylon-compiler by ceylon.

the class TypesImpl method getDeclaredType.

/**
     * {@inheritDoc}
     */
public DeclaredType getDeclaredType(DeclaredType containing, TypeDeclaration decl, TypeMirror... typeArgs) {
    if (containing == null)
        return getDeclaredType(decl, typeArgs);
    ClassSymbol sym = ((TypeDeclarationImpl) decl).sym;
    Type outer = ((TypeMirrorImpl) containing).type;
    if (outer.tsym != sym.owner.enclClass())
        throw new IllegalArgumentException(containing.toString());
    if (!outer.isParameterized())
        return getDeclaredType(decl, typeArgs);
    return getDeclaredType(outer, sym, typeArgs);
}
Also used : Type(com.sun.tools.javac.code.Type) ClassSymbol(com.sun.tools.javac.code.Symbol.ClassSymbol) TypeMirrorImpl(com.sun.tools.apt.mirror.type.TypeMirrorImpl)

Aggregations

TypeMirrorImpl (com.sun.tools.apt.mirror.type.TypeMirrorImpl)1 ClassSymbol (com.sun.tools.javac.code.Symbol.ClassSymbol)1 Type (com.sun.tools.javac.code.Type)1