Search in sources :

Example 6 with TypeParameterMirror

use of org.eclipse.ceylon.model.loader.mirror.TypeParameterMirror in project ceylon by eclipse.

the class ReflectionUtils method getTypeParameters.

public static List<TypeParameterMirror> getTypeParameters(GenericDeclaration decl) {
    TypeVariable<?>[] javaTypeParameters = decl.getTypeParameters();
    List<TypeParameterMirror> typeParameters = new ArrayList<TypeParameterMirror>(javaTypeParameters.length);
    for (Type javaTypeParameter : javaTypeParameters) typeParameters.add(new ReflectionTypeParameter(javaTypeParameter));
    return typeParameters;
}
Also used : GenericArrayType(java.lang.reflect.GenericArrayType) ParameterizedType(java.lang.reflect.ParameterizedType) Type(java.lang.reflect.Type) TypeVariable(java.lang.reflect.TypeVariable) TypeParameterMirror(org.eclipse.ceylon.model.loader.mirror.TypeParameterMirror) ArrayList(java.util.ArrayList)

Aggregations

TypeParameterMirror (org.eclipse.ceylon.model.loader.mirror.TypeParameterMirror)6 ArrayList (java.util.ArrayList)5 FunctionalInterfaceType (org.eclipse.ceylon.model.loader.mirror.FunctionalInterfaceType)4 Type (org.eclipse.ceylon.model.typechecker.model.Type)4 UnknownType (org.eclipse.ceylon.model.typechecker.model.UnknownType)4 TypeMirror (org.eclipse.ceylon.model.loader.mirror.TypeMirror)3 TypeParameter (org.eclipse.ceylon.model.typechecker.model.TypeParameter)3 LazyContainer (org.eclipse.ceylon.model.loader.model.LazyContainer)2 TypeDeclaration (org.eclipse.ceylon.model.typechecker.model.TypeDeclaration)2 GenericArrayType (java.lang.reflect.GenericArrayType)1 ParameterizedType (java.lang.reflect.ParameterizedType)1 Type (java.lang.reflect.Type)1 TypeVariable (java.lang.reflect.TypeVariable)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 CompletionFailure (org.eclipse.ceylon.langtools.tools.javac.code.Symbol.CompletionFailure)1 TypeVariableSymbol (org.eclipse.ceylon.langtools.tools.javac.code.Symbol.TypeVariableSymbol)1