/libcore/luni/src/main/java/libcore/reflect/ |
ListOfVariables.java | 19 import java.lang.reflect.TypeVariable; 23 final ArrayList<TypeVariable<?>> array = new ArrayList<TypeVariable<?>>(); 25 void add (TypeVariable<?> elem) { 29 TypeVariable<?>[] getArray() { 30 TypeVariable<?>[] a = new TypeVariable[array.size()];
|
TypeVariableImpl.java | 24 import java.lang.reflect.TypeVariable; 27 public final class TypeVariableImpl<D extends GenericDeclaration> implements TypeVariable<D> { 36 if(!(o instanceof TypeVariable)) { 39 TypeVariable<?> that = (TypeVariable<?>) o; 72 static TypeVariable findFormalVar(GenericDeclaration layer, String name) { 73 TypeVariable[] formalVars = layer.getTypeParameters(); 74 for (TypeVariable var : formalVars) { 106 TypeVariable var;
|
Types.java | 22 import java.lang.reflect.TypeVariable; 126 if (type instanceof TypeVariable) { 127 out.append(((TypeVariable) type).getName());
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
OldGenericTypesTest.java | 23 import java.lang.reflect.TypeVariable; 67 TypeVariable<Class> typeVariable = getTypeParameter(clazz); 73 assertEquals(typeVariable, parameterType); 78 TypeVariable<Class> typeVariable = getTypeParameter(clazz); 84 assertNotEquals(typeVariable, parameterType); 85 assertInstanceOf(TypeVariable.class, parameterType); 86 assertEquals(method, ((TypeVariable)parameterType).getGenericDeclaration()); 91 TypeVariable<Class> typeVariable = getTypeParameter(clazz) [all...] |
GenericExceptionsTest.java | 23 import java.lang.reflect.TypeVariable; 56 TypeVariable typeVariable = getOnlyValue(constructor.getGenericExceptionTypes(), 57 TypeVariable.class); 58 assertEquals("T", typeVariable.getName()); 59 assertEquals(Arrays.<Type>asList(Throwable.class), Arrays.asList(typeVariable.getBounds())); 64 TypeVariable typeVariable = getOnlyValue(method.getGenericExceptionTypes(), 65 TypeVariable.class); 66 assertEquals("T", typeVariable.getName()) [all...] |
OldGenericReflectionCornerCases.java | 22 import java.lang.reflect.TypeVariable; 43 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); 45 TypeVariable<?> typeParameter = typeParameters[0]; 86 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); 88 TypeVariable<?> typeParameter = typeParameters[0]; 131 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); 133 TypeVariable<?> typeParameter = typeParameters[0]; 183 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); 185 TypeVariable<?> typeParameter = typeParameters[0];
|
ClassLoaderReflectionTest.java | 24 import java.lang.reflect.TypeVariable; 86 TypeVariable<? extends Class<?>>[] typeVariables = cClass.getTypeParameters(); 159 private void assertTypeVariable(TypeVariable actual, String name, Type... bounds) {
|
/libcore/luni/src/test/java/tests/api/java/lang/reflect/ |
TypeVariableTest.java | 23 import java.lang.reflect.TypeVariable; 33 TypeVariable[] typeParameters = clazz.getTypeParameters(); 35 TypeVariable<Class> typeVariable = typeParameters[0]; 36 assertEquals(clazz, typeVariable.getGenericDeclaration()); 37 assertEquals("T", typeVariable.getName()); 38 Type[] bounds = typeVariable.getBounds(); 49 TypeVariable<Method>[] typeParameters = method.getTypeParameters(); 51 TypeVariable<Method> typeVariable = typeParameters[0] [all...] |
GenericReflectionTestsBase.java | 20 import java.lang.reflect.TypeVariable; 33 public TypeVariable<Method> getTypeParameter(Method method) { 34 TypeVariable<Method>[] typeParameters = method.getTypeParameters(); 36 TypeVariable<Method> typeParameter = typeParameters[0]; 48 public TypeVariable<Class> getTypeParameter(Class<?> clazz) { 49 TypeVariable[] typeParameters = clazz.getTypeParameters(); 51 TypeVariable<Class> typeVariable = typeParameters[0]; 52 assertEquals(clazz, typeVariable.getGenericDeclaration()); 53 assertEquals("T", typeVariable.getName()) [all...] |
BoundedGenericMethodsTests.java | 21 import java.lang.reflect.TypeVariable; 51 TypeVariable<Method> typeParameter = getTypeParameter(method); 69 TypeVariable<Method> typeParameter = getTypeParameter(method); 73 assertTrue(genericParameterType instanceof TypeVariable); 74 TypeVariable<?> typeVariable = (TypeVariable<?>) genericParameterType; 75 assertEquals(method, typeVariable.getGenericDeclaration()); 77 Type[] paramBounds = typeVariable.getBounds(); 87 assertTrue(genericReturnType instanceof TypeVariable); [all...] |
GenericMethodsTests.java | 22 import java.lang.reflect.TypeVariable; 56 TypeVariable<Method> typeParameter = getTypeParameter(method); 67 TypeVariable<Method> typeParameter = getTypeParameter(method); 71 assertInstanceOf(TypeVariable.class, genericParameterType); 72 assertEquals(method, ((TypeVariable<?>) genericParameterType).getGenericDeclaration()); 80 TypeVariable<Method> typeParameter = getTypeParameter(method); 83 assertInstanceOf(TypeVariable.class, genericReturnType); 84 assertEquals(method, ((TypeVariable<?>) genericReturnType).getGenericDeclaration()); 111 TypeVariable<Method> typeParameter0 = method0.getTypeParameters()[0]; 114 TypeVariable<Method> typeParameter1 = method1.getTypeParameters()[0] [all...] |
GenericArrayTypeTest.java | 23 import java.lang.reflect.TypeVariable; 41 assertInstanceOf(TypeVariable.class, componentType); 42 TypeVariable<?> componentTypeVariable = (TypeVariable<?>) componentType;
|
WildcardTypeTest.java | 23 import java.lang.reflect.TypeVariable; 58 TypeVariable<Method> typeParameter = getTypeParameter(method); 112 assertTrue(genericReturnType instanceof TypeVariable); 114 TypeVariable<Method> returnTypeVariable = (TypeVariable<Method>) genericReturnType;
|
GenericSignatureFormatErrorTest.java | 15 import java.lang.reflect.TypeVariable; 80 TypeVariable[] tvs = clazz.getTypeParameters(); 82 // for (TypeVariable tv : tvs) {
|
MethodTest.java | 29 import java.lang.reflect.TypeVariable; 464 assertTrue(genericExceptionTypes[0] instanceof TypeVariable<?>); 466 TypeVariable<Class<ExceptionTest<?>>> tv = 467 (TypeVariable<Class<ExceptionTest<?>>>) genericExceptionTypes[0]; 479 assertTrue(returnType instanceof TypeVariable<?>); 481 TypeVariable<Class<ExceptionTest<?>>> tv = 482 (TypeVariable<Class<ExceptionTest<?>>>) returnType; [all...] |
/external/mockito/src/org/mockito/internal/util/reflection/ |
GenericMetadataSupport.java | 65 protected Map<TypeVariable, Type> contextualActualTypeParameters = new HashMap<TypeVariable, Type>();
73 TypeVariable[] typeParameters = ((Class<?>) parameterizedType.getRawType()).getTypeParameters();
76 TypeVariable typeParameter = typeParameters[i];
88 protected void registerTypeParametersOn(TypeVariable[] typeParameters) {
89 for (TypeVariable typeParameter : typeParameters) {
96 * @param typeParameter The TypeVariable parameter
97 * @return A {@link BoundedType} for easy bound information, if first bound is a TypeVariable
98 * then retrieve BoundedType of this TypeVariable
100 private BoundedType boundsOf(TypeVariable typeParameter) { [all...] |
/external/junit/src/org/junit/runners/model/ |
NoGenericTypeParametersValidator.java | 7 import java.lang.reflect.TypeVariable; 24 if (type instanceof TypeVariable<?>) {
|
/libcore/luni/src/main/java/libcore/util/ |
EmptyArray.java | 34 public static final java.lang.reflect.TypeVariable[] TYPE_VARIABLE = 35 new java.lang.reflect.TypeVariable[0];
|
/external/eclipse-windowbuilder/propertysheet/src/org/eclipse/wb/internal/core/utils/reflect/ |
ReflectionUtils.java | 23 import java.lang.reflect.TypeVariable; 101 // TypeVariable 102 TypeVariable<?> typeVariable = (TypeVariable<?>) type; 103 return typeVariable.getName();
|
/libcore/luni/src/main/java/java/lang/reflect/ |
GenericDeclaration.java | 34 TypeVariable<?>[] getTypeParameters();
|
TypeVariable.java | 29 public interface TypeVariable<D extends GenericDeclaration> extends Type {
|
/external/guava/guava-tests/test/com/google/common/collect/ |
FauxveridesTest.java | 33 import java.lang.reflect.TypeVariable; 209 TypeSignature(TypeVariable<Method>[] parameters) { 212 new Function<TypeVariable<?>, TypeParameterSignature>() { 214 public TypeParameterSignature apply(TypeVariable<?> from) { 244 TypeParameterSignature(TypeVariable<?> typeParameter) {
|
/cts/tools/signature-tools/src/signature/converter/doclet/ |
DocletToSigConverter.java | 81 import com.sun.javadoc.TypeVariable;
205 for (TypeVariable typeVariable : classDoc.typeParameters()) {
208 typeVariable)).getTypeVariableDefinition());
367 TypeVariable tv = type.asTypeVariable();
389 SigTypeVariableDefinition typeVariable = pool.getTypeVariable(name,
398 currentTypeVariableDefinition = typeVariable;
406 typeVariable.setUpperBounds(upperBounds);
408 return new SigTypeVariableReference(typeVariable);
462 for (TypeVariable typeParameter : member.typeParameters()) { [all...] |
/dalvik/tests/031-class-attributes/src/ |
ClassAttrs.java | 10 import java.lang.reflect.TypeVariable; 222 TypeVariable<Class<?>>[] typeParameters = clazz.getTypeParameters();
|
/cts/tools/signature-tools/src/signature/converter/dex/ |
GenericSignatureParser.java | 304 SigTypeVariableDefinition typeVariable = factory.getTypeVariable(name, 320 typeVariable.setUpperBounds(bounds); 321 return typeVariable; 344 for (ITypeVariableDefinition typeVariable : declaration 346 if (variableName.equals(typeVariable.getName())) {
|