Home
last modified time | relevance | path

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

12

/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.java94 assertEquals(InterfaceA.class, Sub.class.getMethod("a").getDeclaringClass()); in testGetMethodWithPrivateMethodAndInterfaceMethod()
98 assertEquals(InterfaceA.class, ImplementsC.class.getMethod("a").getDeclaringClass()); in testGetMethodReturnsIndirectlyImplementedInterface()
99 assertEquals(InterfaceA.class, ExtendsImplementsC.class.getMethod("a").getDeclaringClass()); in testGetMethodReturnsIndirectlyImplementedInterface()
104 ImplementsC.class.getDeclaredMethod("a").getDeclaringClass(); in testGetDeclaredMethodReturnsIndirectlyImplementedInterface()
109 ExtendsImplementsC.class.getDeclaredMethod("a").getDeclaringClass(); in testGetDeclaredMethodReturnsIndirectlyImplementedInterface()
176 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testImplementedInterfaceMethodOfAnonymousClass()
185 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testPublicMethodOfAnonymousClass()
206 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testGetDeclaredMethodReturnsPrivateMethodOfAnonymousClass()
360 assertEquals(InterfaceWithStatic.class, method.getDeclaringClass()); in testStaticInterfaceMethod_getMethod()
367 assertEquals(InterfaceWithStatic.class, declaredMethod.getDeclaringClass()); in testStaticInterfaceMethod_getDeclaredMethod()
[all …]
DReflectionTest.java222 assertEquals(C.class, field.getDeclaringClass()); in testGetFieldIsRecursive()
261 assertEquals(DefinesMember.class, field.getDeclaringClass()); in testGetFieldViaExtendsThenImplements()
266 assertEquals(DefinesMember.class, field.getDeclaringClass()); in testGetFieldViaImplementsThenExtends()
281 assertEquals(DefinesMember.class, method.getDeclaringClass()); in testGetMethodViaExtendsThenImplements()
286 assertEquals(DefinesMember.class, method.getDeclaringClass()); in testGetMethodViaImplementsThenExtends()
450 assertNull(ReflectionTest.class.getDeclaringClass()); in testGetDeclaringClass()
451 assertEquals(ReflectionTest.class, Foo.class.getDeclaringClass()); in testGetDeclaringClass()
452 assertEquals(ReflectionTest.class, HasMemberClassesInterface.class.getDeclaringClass()); in testGetDeclaringClass()
454 HasMemberClassesInterface.D.class.getDeclaringClass()); in testGetDeclaringClass()
464 assertEquals(null, C.class.getDeclaringClass()); in testGetDeclaringClassIsNotTransitiveForClassesDefinedInAMethod()
[all …]
/libcore/ojluni/src/main/java/java/lang/reflect/
DConstructor.java96 public Class<T> getDeclaringClass() { in getDeclaringClass() method in Constructor
106 return getDeclaringClass().getName(); in getName()
196 if (getDeclaringClass() == other.getDeclaringClass()) { in equals()
210 return getDeclaringClass().getName().hashCode(); in hashCode()
241 sb.append(getDeclaringClass().getTypeName()); in specificToStringHeader()
DMethod.java103 public Class<?> getDeclaringClass() { in getDeclaringClass() method in Method
244 if ((getDeclaringClass() == other.getDeclaringClass()) in equals()
262 return getDeclaringClass().getName().hashCode() ^ getName().hashCode(); in hashCode()
302 sb.append(getDeclaringClass().getTypeName()).append('.'); in specificToStringHeader()
354 sb.append(getDeclaringClass().getTypeName()).append('.'); in specificToGenericStringHeader()
DField.java75 public Class<?> getDeclaringClass() { in getDeclaringClass() method in Field
216 return (getDeclaringClass() == other.getDeclaringClass()) in equals()
229 return getDeclaringClass().getName().hashCode() ^ getName().hashCode(); in hashCode()
257 + getDeclaringClass().getTypeName() + "." in toString()
286 + getDeclaringClass().getTypeName() + "." in toGenericString()
DMember.java61 public Class<?> getDeclaringClass(); in getDeclaringClass() method
DAccessibleObject.java148 Class<?> clazz = c.getDeclaringClass(); in setAccessible0()
/libcore/ojluni/src/main/java/java/lang/invoke/
DMethodHandleImpl.java82 if (member.getDeclaringClass().isInterface()) { in getReferenceKind()
115 public Class<?> getDeclaringClass() { in getDeclaringClass() method in MethodHandleImpl.HandleInfo
116 return member.getDeclaringClass(); in getDeclaringClass()
162 lookup.checkAccess(member.getDeclaringClass(), member.getDeclaringClass(), in reflectAs()
DMethodHandles.java788 checkAccess(refc, method.getDeclaringClass(), modifiers, method.getName()); in findStatic()
928 checkAccess(refc, method.getDeclaringClass(), method.getModifiers(), method.getName()); in findVirtual()
988 "No constructor for " + constructor.getDeclaringClass() + " matching " + type); in findConstructor()
990 checkAccess(refc, constructor.getDeclaringClass(), constructor.getModifiers(), in findConstructor()
997 Class<?> refc = constructor.getDeclaringClass(); in createMethodHandleForConstructor()
1175 if (!method.getDeclaringClass().isAssignableFrom(specialCaller)) { in findSpecial()
1375 checkAccess(refc, field.getDeclaringClass(), modifiers, field.getName()); in commonFieldChecks()
1608 checkAccess(m.getDeclaringClass(), m.getDeclaringClass(), m.getModifiers(), in unreflect()
1615 methodType = methodType.insertParameterTypes(0, m.getDeclaringClass()); in unreflect()
1666 return findSpecial(m, methodType, m.getDeclaringClass() /* refc */, specialCaller); in unreflectSpecial()
[all …]
DMethodHandleInfo.java154 public Class<?> getDeclaringClass(); in getDeclaringClass() method
/libcore/ojluni/src/main/java/java/util/
DEnumSet.java214 EnumSet<E> result = noneOf(e.getDeclaringClass()); in of()
235 EnumSet<E> result = noneOf(e1.getDeclaringClass()); in of()
258 EnumSet<E> result = noneOf(e1.getDeclaringClass()); in of()
283 EnumSet<E> result = noneOf(e1.getDeclaringClass()); in of()
312 EnumSet<E> result = noneOf(e1.getDeclaringClass()); in of()
337 EnumSet<E> result = noneOf(first.getDeclaringClass()); in of()
361 EnumSet<E> result = noneOf(from.getDeclaringClass()); in range()
/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/ojluni/src/main/java/java/lang/
DEnum.java185 self.getDeclaringClass() != other.getDeclaringClass()) in compareTo()
203 public final Class<E> getDeclaringClass() { in getDeclaringClass() method in Enum
/libcore/ojluni/annotations/sdk/nullability/java/lang/reflect/
DMember.annotated.java33 @libcore.util.NonNull public java.lang.Class<?> getDeclaringClass(); in getDeclaringClass() method
DConstructor.annotated.java36 @libcore.util.NonNull public java.lang.Class<T> getDeclaringClass() { throw new RuntimeException("S… in getDeclaringClass() method in Constructor
DExecutable.annotated.java36 @libcore.util.NonNull public abstract java.lang.Class<?> getDeclaringClass(); in getDeclaringClass() method in Executable
DMethod.annotated.java36 @libcore.util.NonNull public java.lang.Class<?> getDeclaringClass() { throw new RuntimeException("S… in getDeclaringClass() method in Method
/libcore/luni/src/main/java/libcore/reflect/
DTypeVariableImpl.java94 return ((Method)decl).getDeclaringClass(); in nextLayer()
96 return ((Constructor)decl).getDeclaringClass(); in nextLayer()
DParameterizedTypeImpl.java54 ownerTypeRes = getRawType().getDeclaringClass(); in getOwnerType()
/libcore/libart/src/main/java/java/lang/invoke/
DFieldVarHandle.java43 return new FieldVarHandle(field, field.getDeclaringClass()); in create()
/libcore/luni/src/test/java/libcore/build/
DDuplicateBridgeMethodsTest.java53 method.getDeclaringClass(), java.lang.Enum.class); in testSubclassHasNoBridgeMethod()
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DEnum.annotated.java50 @libcore.util.NonNull public final java.lang.Class<E> getDeclaringClass() { throw new RuntimeExcept… in getDeclaringClass() method in Enum
/libcore/ojluni/annotations/hiddenapi/java/lang/
DEnum.java67 public final java.lang.Class<E> getDeclaringClass() { in getDeclaringClass() method in Enum

12