Home
last modified time | relevance | path

Searched refs:Modifier (Results 1 – 25 of 31) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DModifierTest.java20 import java.lang.reflect.Modifier;
31 new Modifier(); in test_Constructor()
39 assertTrue("ABSTRACT returned false", Modifier.isAbstract(ALL_FLAGS)); in test_isAbstractI()
40 assertTrue("ABSTRACT returned false", Modifier in test_isAbstractI()
41 .isAbstract(Modifier.ABSTRACT)); in test_isAbstractI()
42 assertTrue("Non-ABSTRACT returned true", !Modifier in test_isAbstractI()
43 .isAbstract(Modifier.TRANSIENT)); in test_isAbstractI()
51 assertTrue("FINAL returned false", Modifier.isFinal(ALL_FLAGS)); in test_isFinalI()
52 assertTrue("FINAL returned false", Modifier.isFinal(Modifier.FINAL)); in test_isFinalI()
53 assertTrue("Non-FINAL returned true", !Modifier in test_isFinalI()
[all …]
DMalformedParameterizedTypeExceptionTests.java5 import java.lang.reflect.Modifier;
16 assertTrue("Constructor is not protected", Modifier.isPublic(ctor in test_Constructor()
DConstructorTest.java26 import java.lang.reflect.Modifier;
227 ((mod & Modifier.PUBLIC) == Modifier.PUBLIC) in test_getModifiers()
228 && ((mod & Modifier.PRIVATE) == 0)); in test_getModifiers()
238 ((mod & Modifier.PRIVATE) == Modifier.PRIVATE) in test_getModifiers()
239 && ((mod & Modifier.PUBLIC) == 0)); in test_getModifiers()
249 ((mod & Modifier.PROTECTED) == Modifier.PROTECTED) in test_getModifiers()
250 && ((mod & Modifier.PUBLIC) == 0)); in test_getModifiers()
DMethodTest.java27 import java.lang.reflect.Modifier;
299 mask = Modifier.PUBLIC | Modifier.STATIC; in test_getModifiers()
307 mask = Modifier.PRIVATE | Modifier.STATIC; in test_getModifiers()
315 mask = (Modifier.PUBLIC | Modifier.STATIC) | Modifier.SYNCHRONIZED; in test_getModifiers()
323 mask = ((Modifier.PUBLIC | Modifier.STATIC) | Modifier.SYNCHRONIZED) in test_getModifiers()
324 | Modifier.NATIVE; in test_getModifiers()
333 mask = Modifier.PUBLIC | Modifier.ABSTRACT; in test_getModifiers()
DInvocationTargetExceptionTest.java27 import java.lang.reflect.Modifier;
121 assertTrue("Constructor is not protected", Modifier.isProtected(ctor in test_Constructor()
DFieldTest.java29 import java.lang.reflect.Modifier;
966 int mask = (Modifier.PROTECTED | Modifier.STATIC) in test_getModifiers()
967 | (Modifier.TRANSIENT | Modifier.VOLATILE); in test_getModifiers()
968 int nmask = (Modifier.PUBLIC | Modifier.NATIVE); in test_getModifiers()
DAccessibleObjectTest.java27 import java.lang.reflect.Modifier;
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DModifierTest.java19 import java.lang.reflect.Modifier;
23 assertEquals(0xc1f, Modifier.classModifiers()); in test_classModifiers()
27 assertEquals(0x007, Modifier.constructorModifiers()); in test_constructorModifiers()
31 assertEquals(0x0df, Modifier.fieldModifiers()); in test_fieldModifiers()
35 assertEquals(0xc0f, Modifier.interfaceModifiers()); in test_interfaceModifiers()
39 assertEquals(0xd3f, Modifier.methodModifiers()); in test_methodModifiers()
43 assertTrue(Modifier.isAbstract(Modifier.ABSTRACT)); in test_isAbstractI()
44 assertTrue(!Modifier.isAbstract(-1 & ~Modifier.ABSTRACT)); in test_isAbstractI()
48 assertTrue(Modifier.isFinal(Modifier.FINAL)); in test_isFinalI()
49 assertTrue(!Modifier.isFinal(-1 & ~Modifier.FINAL)); in test_isFinalI()
[all …]
DFieldTest.java20 import java.lang.reflect.Modifier;
57 assertEquals(Modifier.SYNTHETIC, valuesField.getModifiers() & Modifier.SYNTHETIC); in testSyntheticModifier()
66 assertEquals("public static final", Modifier.toString(blockedField.getModifiers())); in testEnumValueField()
82 assertEquals(Modifier.TRANSIENT, transientField.getModifiers() & Modifier.TRANSIENT); in testTransientModifier()
93 assertEquals(Modifier.TRANSIENT, transientField.getModifiers() & Modifier.TRANSIENT); in testToGenericString()
DAnnotationsTest.java31 import java.lang.reflect.Modifier;
220 assertTrue(Modifier.isPublic(modifiers)); in testClassModifiers()
221 assertFalse(Modifier.isProtected(modifiers)); in testClassModifiers()
222 assertFalse(Modifier.isPrivate(modifiers)); in testClassModifiers()
223 assertFalse(Modifier.isAbstract(modifiers)); in testClassModifiers()
224 assertFalse(Modifier.isStatic(modifiers)); in testClassModifiers()
225 assertTrue(Modifier.isFinal(modifiers)); in testClassModifiers()
226 assertFalse(Modifier.isStrict(modifiers)); in testClassModifiers()
231 assertFalse(Modifier.isPublic(modifiers)); in testInnerClassModifiers()
232 assertFalse(Modifier.isProtected(modifiers)); in testInnerClassModifiers()
[all …]
DOldAndroidClassTest.java22 import java.lang.reflect.Modifier;
96 assertTrue(Modifier.isPublic(helloClass.getModifiers())); in testGetModifiers()
/libcore/ojluni/src/main/java/java/lang/reflect/
DModifier.java44 class Modifier { class
135 return ((modifiers & Modifier.CONSTRUCTOR) != 0); in isConstructor()
366 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE |
367 Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL |
368 Modifier.STRICT;
374 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE |
375 Modifier.ABSTRACT | Modifier.STATIC | Modifier.STRICT;
382 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE;
388 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE |
389 Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL |
[all …]
DMethod.java327 int mod = getModifiers() & Modifier.methodModifiers(); in toString()
329 sb.append(Modifier.toString(mod)).append(' '); in toString()
397 int mod = getModifiers() & Modifier.methodModifiers(); in toGenericString()
399 sb.append(Modifier.toString(mod)).append(' '); in toGenericString()
521 return (getModifiers() & Modifier.BRIDGE) != 0; in isBridge()
534 return (getModifiers() & Modifier.VARARGS) != 0; in isVarArgs()
546 return Modifier.isSynthetic(getModifiers()); in isSynthetic()
DConstructor.java265 int mod = getModifiers() & Modifier.constructorModifiers(); in toString()
267 sb.append(Modifier.toString(mod) + " "); in toString()
329 int mod = getModifiers() & Modifier.constructorModifiers(); in toGenericString()
331 sb.append(Modifier.toString(mod) + " "); in toGenericString()
452 return (getModifiers() & Modifier.VARARGS) != 0; in isVarArgs()
465 return Modifier.isSynthetic(getModifiers()); in isSynthetic()
DField.java113 return (getModifiers() & Modifier.ENUM) != 0; in isEnumConstant()
125 return Modifier.isSynthetic(getModifiers()); in isSynthetic()
235 return (((mod == 0) ? "" : (Modifier.toString(mod) + " ")) in toString()
263 return (((mod == 0) ? "" : (Modifier.toString(mod) + " ")) in toGenericString()
/libcore/ojluni/src/main/java/sun/reflect/
DReflection.java53 Modifier.toString(modifiers) + in ensureMemberAccess()
80 if (!Modifier.isPublic(memberClass.getAccessFlags())) { in verifyMemberAccess()
91 if (Modifier.isPublic(modifiers)) { in verifyMemberAccess()
97 if (Modifier.isProtected(modifiers)) { in verifyMemberAccess()
104 if (!successSoFar && !Modifier.isPrivate(modifiers)) { in verifyMemberAccess()
120 if (Modifier.isProtected(modifiers)) { in verifyMemberAccess()
/libcore/libart/src/main/java/java/lang/reflect/
DAbstractMethod.java91 if ((flags & Modifier.ABSTRACT) != 0) { in fixMethodFlags()
92 flags &= ~Modifier.NATIVE; in fixMethodFlags()
94 flags &= ~Modifier.SYNCHRONIZED; in fixMethodFlags()
97 flags |= Modifier.SYNCHRONIZED; in fixMethodFlags()
107 return (accessFlags & Modifier.VARARGS) != 0; in isVarArgs()
111 return (accessFlags & Modifier.BRIDGE) != 0; in isBridge()
115 return (accessFlags & Modifier.SYNTHETIC) != 0; in isSynthetic()
119 return (accessFlags & Modifier.DEFAULT) != 0; in isDefault()
334 sb.append(Modifier.toString(modifiers & ~Modifier.VARARGS)).append(' '); in toGenericStringHelper()
/libcore/ojluni/src/main/java/java/io/
DObjectStreamClass.java37 import java.lang.reflect.Modifier;
1337 return ((cons.getModifiers() & Modifier.PUBLIC) != 0) ? in getExternalizableConstructor()
1359 if ((mods & Modifier.PRIVATE) != 0 || in getSerializableConstructor()
1360 ((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) == 0 && in getSerializableConstructor()
1401 if ((mods & (Modifier.STATIC | Modifier.ABSTRACT)) != 0) { in getInheritableMethod()
1403 } else if ((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) != 0) { in getInheritableMethod()
1405 } else if ((mods & Modifier.PRIVATE) != 0) { in getInheritableMethod()
1426 ((mods & Modifier.STATIC) == 0) && in getPrivateMethod()
1427 ((mods & Modifier.PRIVATE) != 0)) ? meth : null; in getPrivateMethod()
1578 int mask = Modifier.PRIVATE | Modifier.STATIC | Modifier.FINAL; in getDeclaredSerialFields()
[all …]
/libcore/luni/src/main/java/libcore/util/
DObjects.java20 import java.lang.reflect.Modifier;
48 if ((f.getModifiers() & (Modifier.STATIC | Modifier.TRANSIENT)) != 0) { in toString()
/libcore/ojluni/src/main/java/java/lang/
DClass.java37 import java.lang.reflect.Modifier;
564 return (accessFlags & Modifier.INTERFACE) != 0; in isInterface()
1048 if ((componentModifiers & Modifier.INTERFACE) != 0) { in getModifiers()
1049 componentModifiers &= ~(Modifier.INTERFACE | Modifier.STATIC); in getModifiers()
1051 return Modifier.ABSTRACT | Modifier.FINAL | componentModifiers; in getModifiers()
1294 if (Modifier.isPublic(member.getModifiers())) { in getClasses()
1980 (recursivePublicMethods && !Modifier.isPublic(result.getAccessFlags()))) { in getMethod()
1989 if (result != null && Modifier.isPublic(result.getAccessFlags())) { in getPublicMethodRecursive()
2002 if (result != null && Modifier.isPublic(result.getAccessFlags())) { in getPublicMethodRecursive()
2203 … if (result == null || which == Member.PUBLIC && !Modifier.isPublic(result.getAccessFlags())) { in getConstructor0()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DClassTest.java27 import java.lang.reflect.Modifier;
394 assertFalse("default class is public", Modifier.isPublic(dcm)); in test_getModifiers()
395 assertFalse("default class is protected", Modifier.isProtected(dcm)); in test_getModifiers()
396 assertTrue("default class is not private", Modifier.isPrivate(dcm)); in test_getModifiers()
399 assertTrue("public class is not public", Modifier.isPublic(ocm)); in test_getModifiers()
400 assertFalse("public class is protected", Modifier.isProtected(ocm)); in test_getModifiers()
401 assertFalse("public class is private", Modifier.isPrivate(ocm)); in test_getModifiers()
/libcore/luni/src/main/java/java/util/concurrent/atomic/
DAtomicLongFieldUpdater.java11 import java.lang.reflect.Modifier;
379 if (!Modifier.isVolatile(modifiers)) in CASUpdater()
382 this.cclass = (Modifier.isProtected(modifiers)) ? caller : tclass; in CASUpdater()
509 if (!Modifier.isVolatile(modifiers)) in LockedUpdater()
512 this.cclass = (Modifier.isProtected(modifiers)) ? caller : tclass; in LockedUpdater()
DAtomicReferenceFieldUpdater.java11 import java.lang.reflect.Modifier;
317 if (!Modifier.isVolatile(modifiers)) in AtomicReferenceFieldUpdaterImpl()
320 this.cclass = (Modifier.isProtected(modifiers)) ? caller : tclass; in AtomicReferenceFieldUpdaterImpl()
DAtomicIntegerFieldUpdater.java11 import java.lang.reflect.Modifier;
386 if (!Modifier.isVolatile(modifiers)) in AtomicIntegerFieldUpdaterImpl()
389 this.cclass = (Modifier.isProtected(modifiers)) ? caller : tclass; in AtomicIntegerFieldUpdaterImpl()
/libcore/ojluni/src/main/java/sun/misc/
DUnsafe.java30 import java.lang.reflect.Modifier;
78 if (Modifier.isStatic(field.getModifiers())) { in objectFieldOffset()

12