/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
OldGenericTypesTest.java | 24 import java.lang.reflect.TypeVariable; 68 TypeVariable<Class> typeVariable = getTypeParameter(clazz); 74 assertEquals(typeVariable, parameterType); 79 TypeVariable<Class> typeVariable = getTypeParameter(clazz); 85 assertNotEquals(typeVariable, parameterType); 86 assertInstanceOf(TypeVariable.class, parameterType); 87 assertEquals(method, ((TypeVariable)parameterType).getGenericDeclaration()); 92 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 | 23 import java.lang.reflect.TypeVariable; 44 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); 46 TypeVariable<?> typeParameter = typeParameters[0]; 87 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); 89 TypeVariable<?> typeParameter = typeParameters[0]; 133 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); 135 TypeVariable<?> typeParameter = typeParameters[0]; 186 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); 188 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) {
|
ReflectionTest.java | 26 import java.lang.reflect.TypeVariable; 124 TypeVariable t = C.class.getDeclaredMethod("methodFour", Set.class).getTypeParameters()[0]; 130 assertEquals("T", ((TypeVariable) comparableT.getActualTypeArguments()[0]).getName());
|
/libcore/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ |
ListOfVariables.java | 19 import java.lang.reflect.TypeVariable; 23 public static final TypeVariable[] EMPTY = new ImplForVariable[0]; 25 ArrayList<TypeVariable<?>> array = new ArrayList<TypeVariable<?>>(); 27 void add (TypeVariable<?> elem) { 31 TypeVariable<?>[] getArray() { 32 TypeVariable<?>[] a = new TypeVariable[array.size()];
|
ImplForVariable.java | 23 import java.lang.reflect.TypeVariable; 26 public final class ImplForVariable<D extends GenericDeclaration> implements TypeVariable<D> { 35 if(!(o instanceof TypeVariable)) { 38 TypeVariable<?> that = (TypeVariable<?>) o; 71 static TypeVariable findFormalVar(GenericDeclaration layer, String name) { 72 TypeVariable[] formalVars = layer.getTypeParameters(); 73 for (TypeVariable var : formalVars) { 109 TypeVariable var;
|
GenericSignatureParser.java | 24 import java.lang.reflect.TypeVariable; 71 public TypeVariable[] formalTypeParameters;
|
/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...] |
ConstructorTest.java | 28 import java.lang.reflect.TypeVariable; 338 ((TypeVariable)types[0]).getName()); 340 ((TypeVariable)types[1]).getName()); 370 ((TypeVariable)types[0]).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 {
|
AccessibleObject.java | 278 if (obj instanceof TypeVariable) { 279 sb.append(((TypeVariable)obj).getName());
|
Constructor.java | 59 TypeVariable<Constructor<T>>[] formalTypeParameters; 114 public TypeVariable<Constructor<T>>[] getTypeParameters() {
|
Method.java | 95 private TypeVariable<Method>[] formalTypeParameters; 137 public TypeVariable<Method>[] getTypeParameters() {
|
/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...] |
/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())) {
|
/cts/tools/signature-tools/test/signature/comparator/ |
ClassCompareTest.java | 38 import java.lang.reflect.TypeVariable; 211 Type[] bounds = ((TypeVariable<?>)sC.getActualTypeArguments()[0]).getBounds();
|