Home
last modified time | relevance | path

Searched refs:getDeclaringClass (Results 1 – 24 of 24) sorted by relevance

/libcore/luni/src/test/java/libcore/java/lang/reflect/
DMethodOverridesTest.java42 assertEquals(StringBuilder.class, method.getDeclaringClass()); in testDeclaringClass()
66 assertEquals(Sub.class, Sub.class.getMethod("unchanged").getDeclaringClass()); in testGetDeclaringClassReturnsOverridingClass()
67 assertEquals(Sub.class, Sub.class.getDeclaredMethod("unchanged").getDeclaringClass()); in testGetDeclaringClassReturnsOverridingClass()
74 assertEquals(Sub.class, Sub.class.getMethod("thrower").getDeclaringClass()); in testGetMethodsDoesNotIncludeExceptionChanges()
83 assertEquals(Sub.class, method.getDeclaringClass()); in testGetMethodsIncludesSyntheticMethods()
93 assertEquals(Sub.class, method.getDeclaringClass()); in testGetDeclaredMethodsIncludesSyntheticMethods()
102 assertEquals(Sub.class, method.getDeclaringClass()); in testSubclassChangesVisibility()
110 assertEquals(Sub.class, method.getDeclaringClass()); in testSubclassChangesVisibility()
119 assertEquals(PublicSub.class, method.getDeclaringClass()); in testMoreVisibleSubclassChangesVisibility()
127 assertEquals(PublicSub.class, method.getDeclaringClass()); in testMoreVisibleSubclassChangesVisibility()
DMethodTest.java50 assertEquals(InterfaceA.class, Sub.class.getMethod("a").getDeclaringClass()); in testGetMethodWithPrivateMethodAndInterfaceMethod()
54 assertEquals(InterfaceA.class, ImplementsC.class.getMethod("a").getDeclaringClass()); in testGetMethodReturnsIndirectlyImplementedInterface()
55 assertEquals(InterfaceA.class, ExtendsImplementsC.class.getMethod("a").getDeclaringClass()); in testGetMethodReturnsIndirectlyImplementedInterface()
60 ImplementsC.class.getDeclaredMethod("a").getDeclaringClass(); in testGetDeclaredMethodReturnsIndirectlyImplementedInterface()
65 ExtendsImplementsC.class.getDeclaredMethod("a").getDeclaringClass(); in testGetDeclaredMethodReturnsIndirectlyImplementedInterface()
132 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testImplementedInterfaceMethodOfAnonymousClass()
141 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testPublicMethodOfAnonymousClass()
162 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testGetDeclaredMethodReturnsPrivateMethodOfAnonymousClass()
DAnnotationsTest.java111 assertNull(AnnotationsTest.class.getDeclaringClass()); in testGetDeclaringClass()
112 assertEquals(AnnotationsTest.class, Foo.class.getDeclaringClass()); in testGetDeclaringClass()
113 assertEquals(AnnotationsTest.class, HasMemberClassesInterface.class.getDeclaringClass()); in testGetDeclaringClass()
115 HasMemberClassesInterface.D.class.getDeclaringClass()); in testGetDeclaringClass()
125 assertEquals(null, C.class.getDeclaringClass()); in testGetDeclaringClassIsNotTransitiveForClassesDefinedInAMethod()
141 assertNull(staticAnonymous.getClass().getDeclaringClass()); in testStaticFieldAnonymousClass()
162 assertNull(foo.c.getDeclaringClass()); in testClassEnclosedByConstructor()
172 assertNull(foo.c.getDeclaringClass()); in testClassEnclosedByMethod()
DReflectionTest.java216 assertEquals(C.class, field.getDeclaringClass()); in testGetFieldIsRecursive()
255 assertEquals(DefinesMember.class, field.getDeclaringClass()); in testGetFieldViaExtendsThenImplements()
260 assertEquals(DefinesMember.class, field.getDeclaringClass()); in testGetFieldViaImplementsThenExtends()
275 assertEquals(DefinesMember.class, method.getDeclaringClass()); in testGetMethodViaExtendsThenImplements()
280 assertEquals(DefinesMember.class, method.getDeclaringClass()); in testGetMethodViaImplementsThenExtends()
/libcore/libart/src/main/java/java/lang/reflect/
DConstructor.java85 return getDeclaringClass().getName(); in getName()
91 @Override public Class<T> getDeclaringClass() { in getDeclaringClass() method in Constructor
92 return (Class<T>) super.getDeclaringClass(); in getDeclaringClass()
120 return getDeclaringClass().getName().hashCode(); in hashCode()
311 result.append(getDeclaringClass().getName()); in toString()
330 Class<?> declaringClass = getDeclaringClass(); in setAccessible()
DField.java64 Class<?> aType = a.getDeclaringClass();
65 Class<?> bType = b.getDeclaringClass();
131 @Override public Class<?> getDeclaringClass() { in getDeclaringClass() method in Field
168 return getDeclaringClass().getName().hashCode() ^ getName().hashCode(); in hashCode()
204 sb.append(getDeclaringClass().getName()).append('.').append(getName()); in toGenericString()
222 Class<?> declaringClass = getDeclaringClass(); in getGenericType()
798 result.append(getDeclaringClass().getName()); in toString()
DMethod.java141 @Override public Class<?> getDeclaringClass() { in getDeclaringClass() method in Method
142 return super.getDeclaringClass(); in getDeclaringClass()
152 if (getDeclaringClass().isProxy()) { in getExceptionTypes()
193 return getDeclaringClass().getName().hashCode() ^ getName().hashCode(); in hashCode()
404 result.append(getDeclaringClass().getName()); in toString()
DAbstractMethod.java129 Class<?> getDeclaringClass() { in getDeclaringClass() method in AbstractMethod
266 new GenericSignatureParser(member.getDeclaringClass().getClassLoader()); in getMethodOrConstructorGenericInfo()
331 Class<?> declaringClass = ((Member) this).getDeclaringClass(); in toGenericStringHelper()
DProxy.java55 Class<?> aClass = a.getDeclaringClass();
56 Class<?> bClass = b.getDeclaringClass();
/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidEnumTest.java46 assertSame(MyEnum.ONE.getDeclaringClass(), MyEnum.class); in testEnum()
47 assertSame(MyEnum.FOUR.getDeclaringClass(), MyEnum.class); in testEnum()
DOldClassTest.java718 assertEquals(OldClassTest.class, Intf1.class.getDeclaringClass()); in test_getDeclaringClass()
719 assertEquals(null, Serializable.class.getDeclaringClass()); in test_getDeclaringClass()
720 assertEquals(null, OldClassTest.class.getDeclaringClass()); in test_getDeclaringClass()
722 assertEquals(OldClassTest.class, PublicTestClass.class.getDeclaringClass()); in test_getDeclaringClass()
725 assertEquals(null, new Object() {}.getClass().getDeclaringClass()); in test_getDeclaringClass()
726 …Equals(null, new AnonymousMemberFixture().instanceOfAnonymousClass.getClass().getDeclaringClass()); in test_getDeclaringClass()
729 assertEquals(null, char[].class.getDeclaringClass()); in test_getDeclaringClass()
730 assertEquals(null, int.class.getDeclaringClass()); in test_getDeclaringClass()
731 assertEquals(null, void.class.getDeclaringClass()); in test_getDeclaringClass()
/libcore/luni/src/main/java/java/lang/reflect/
DMember.java47 Class<?> getDeclaringClass(); in getDeclaringClass() method
/libcore/luni/src/main/java/libcore/reflect/
DTypeVariableImpl.java93 return ((Method)decl).getDeclaringClass(); in nextLayer()
95 return ((Constructor)decl).getDeclaringClass(); in nextLayer()
DParameterizedTypeImpl.java53 ownerTypeRes = getRawType().getDeclaringClass(); in getOwnerType()
DAnnotationAccess.java267 : ((Member) element).getDeclaringClass(); in getDexClass()
341 Class<?> annotationClass = method.getDeclaringClass(); in getDefaultValue()
/libcore/luni/src/main/java/java/util/
DEnumSet.java111 EnumSet<E> set = EnumSet.noneOf(element.getDeclaringClass()); in copyOf()
152 EnumSet<E> set = EnumSet.noneOf(e.getDeclaringClass()); in of()
290 EnumSet<E> set = EnumSet.noneOf(start.getDeclaringClass()); in range()
/libcore/libart/src/main/java/java/lang/
DClass.java395 String name = getDeclaringClass().getCanonicalName(); in getCanonicalName()
800 public Class<?> getDeclaringClass() { in getDeclaringClass() method in Class
814 Class<?> declaringClass = getDeclaringClass(); in getEnclosingClass()
820 return ((Member) member).getDeclaringClass(); in getEnclosingClass()
1343 return getDeclaringClass() != null; in isMemberClass()
DEnum.java161 public final Class<E> getDeclaringClass() { in getDeclaringClass() method in Enum
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DEnumTest.java86 assertEquals(Sample.class, moe.getDeclaringClass()); in test_getDeclaringClass()
DClassTest.java311 assertEquals(ClassTest.class, TestClass.class.getDeclaringClass()); in test_getDeclaringClass()
/libcore/support/src/test/java/org/apache/harmony/testframework/serialization/
DSerializationTest.java277 if (m.getDeclaringClass() != Object.class) { in defineComparator()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DMethodTest.java251 + mths[0].getDeclaringClass().toString(), mths[0] in test_getDeclaringClass()
252 .getDeclaringClass().equals(TestMethod.class)); in test_getDeclaringClass()
DConstructorTest.java194 val = ctor.getDeclaringClass().equals(pclass); in test_getDeclaringClass()
DFieldTest.java723 .getDeclaringClass().equals(TestField.class)); in test_getDeclaringClass()
729 .getDeclaringClass().equals(TestField.class)); in test_getDeclaringClass()
1617 ^ field.getDeclaringClass().getName().hashCode(), field in test_hashCode()