/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
D | ModifierTest.java | 20 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 …]
|
D | ConstructorTest.java | 26 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()
|
D | MalformedParameterizedTypeExceptionTests.java | 5 import java.lang.reflect.Modifier; 16 assertTrue("Constructor is not protected", Modifier.isPublic(ctor in test_Constructor()
|
D | MethodTest.java | 27 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()
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | ModifierTest.java | 19 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 assertEquals(0x10, Modifier.parameterModifiers()); in test_parameterModifiers() 47 assertTrue(Modifier.isAbstract(Modifier.ABSTRACT)); in test_isAbstractI() 48 assertTrue(!Modifier.isAbstract(-1 & ~Modifier.ABSTRACT)); in test_isAbstractI() 52 assertTrue(Modifier.isFinal(Modifier.FINAL)); in test_isFinalI() [all …]
|
D | FieldTest.java | 20 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()
|
D | ReflectionTest.java | 27 import java.lang.reflect.Modifier; 556 assertTrue(Modifier.isPublic(modifiers)); in testClassModifiers() 557 assertFalse(Modifier.isProtected(modifiers)); in testClassModifiers() 558 assertFalse(Modifier.isPrivate(modifiers)); in testClassModifiers() 559 assertFalse(Modifier.isAbstract(modifiers)); in testClassModifiers() 560 assertFalse(Modifier.isStatic(modifiers)); in testClassModifiers() 561 assertTrue(Modifier.isFinal(modifiers)); in testClassModifiers() 562 assertFalse(Modifier.isStrict(modifiers)); in testClassModifiers() 567 assertFalse(Modifier.isPublic(modifiers)); in testInnerClassModifiers() 568 assertFalse(Modifier.isProtected(modifiers)); in testInnerClassModifiers() [all …]
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | Modifier.java | 45 public class Modifier { class 150 return ((modifiers & Modifier.CONSTRUCTOR) != 0); in isConstructor() 397 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | 398 Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | 399 Modifier.STRICT; 406 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | 407 Modifier.ABSTRACT | Modifier.STATIC | Modifier.STRICT; 415 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE; 422 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | 423 Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | [all …]
|
D | Executable.java | 86 sb.append(Modifier.toString(mod)).append(' '); in printModifiersIfNonzero() 88 int access_mod = mod & Modifier.ACCESS_MODIFIERS; in printModifiersIfNonzero() 90 sb.append(Modifier.toString(access_mod)).append(' '); in printModifiersIfNonzero() 93 mod = (mod & ~Modifier.ACCESS_MODIFIERS); in printModifiersIfNonzero() 95 sb.append(Modifier.toString(mod)).append(' '); in printModifiersIfNonzero() 358 final int mask = Modifier.FINAL | Modifier.SYNTHETIC | Modifier.MANDATED; in verifyParameters() 487 return (accessFlags & Modifier.VARARGS) != 0; in isVarArgs() 501 return (accessFlags & Modifier.SYNTHETIC) != 0; in isSynthetic() 610 if ((flags & Modifier.ABSTRACT) != 0) { in fixMethodFlags() 611 flags &= ~Modifier.NATIVE; in fixMethodFlags() [all …]
|
D | Field.java | 87 if ((getModifiers() & Modifier.STATIC) == 0) { in getName() 126 return (getModifiers() & Modifier.ENUM) != 0; in isEnumConstant() 138 return Modifier.isSynthetic(getModifiers()); in isSynthetic() 255 return (((mod == 0) ? "" : (Modifier.toString(mod) + " ")) in toString() 284 return (((mod == 0) ? "" : (Modifier.toString(mod) + " ")) in toGenericString()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | AbstractTest.java | 68 import java.lang.reflect.Modifier; 86 assertTrue(Modifier.isPublic(cls.getModifiers())); in assertImmutable() 87 assertTrue(Modifier.isFinal(cls.getModifiers())); in assertImmutable() 91 if (Modifier.isStatic(field.getModifiers())) { in assertImmutable() 92 assertTrue(Modifier.isFinal(field.getModifiers()), "Field:" + field.getName()); in assertImmutable() 94 … assertTrue(Modifier.isPrivate(field.getModifiers()), "Field:" + field.getName()); in assertImmutable() 95 assertTrue(Modifier.isFinal(field.getModifiers()), "Field:" + field.getName()); in assertImmutable() 101 assertTrue(Modifier.isPrivate(con.getModifiers())); in assertImmutable()
|
/libcore/libart/src/main/java/java/lang/invoke/ |
D | FieldVarHandle.java | 20 import java.lang.reflect.Modifier; 30 super(field.getType(), Modifier.isFinal(field.getModifiers()), coordinateType0); in FieldVarHandle() 35 super(field.getType(), Modifier.isFinal(field.getModifiers())); in FieldVarHandle() 40 assert !Modifier.isStatic(field.getModifiers()); in create()
|
D | StaticFieldVarHandle.java | 20 import java.lang.reflect.Modifier; 35 assert Modifier.isStatic(staticField.getModifiers()); in create()
|
/libcore/ojluni/src/main/java/jdk/internal/reflect/ |
D | Reflection.java | 125 Modifier.toString(modifiers) + in ensureMemberAccess() 155 if (!Modifier.isPublic(memberClass.getAccessFlags())) { in verifyMemberAccess() 165 if (Modifier.isPublic(modifiers)) { in verifyMemberAccess() 171 if (Modifier.isProtected(modifiers)) { in verifyMemberAccess() 178 if (!successSoFar && !Modifier.isPrivate(modifiers)) { in verifyMemberAccess() 194 if (Modifier.isProtected(modifiers)) { in verifyMemberAccess()
|
/libcore/ojluni/src/main/java/sun/reflect/ |
D | Reflection.java | 125 Modifier.toString(modifiers) + in ensureMemberAccess() 155 if (!Modifier.isPublic(memberClass.getAccessFlags())) { in verifyMemberAccess() 165 if (Modifier.isPublic(modifiers)) { in verifyMemberAccess() 171 if (Modifier.isProtected(modifiers)) { in verifyMemberAccess() 178 if (!successSoFar && !Modifier.isPrivate(modifiers)) { in verifyMemberAccess() 194 if (Modifier.isProtected(modifiers)) { in verifyMemberAccess()
|
/libcore/ojluni/src/main/java/java/io/ |
D | ObjectStreamClass.java | 40 import java.lang.reflect.Modifier; 1443 return ((cons.getModifiers() & Modifier.PUBLIC) != 0) ? in getExternalizableConstructor() 1465 if ((mods & Modifier.PRIVATE) != 0 || in getSerializableConstructor() 1466 ((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) == 0 && in getSerializableConstructor() 1541 if ((mods & (Modifier.STATIC | Modifier.ABSTRACT)) != 0) { in getInheritableMethod() 1543 } else if ((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) != 0) { in getInheritableMethod() 1545 } else if ((mods & Modifier.PRIVATE) != 0) { in getInheritableMethod() 1566 ((mods & Modifier.STATIC) == 0) && in getPrivateMethod() 1567 ((mods & Modifier.PRIVATE) != 0)) ? meth : null; in getPrivateMethod() 1721 int mask = Modifier.PRIVATE | Modifier.STATIC | Modifier.FINAL; in getDeclaredSerialFields() [all …]
|
/libcore/ojluni/src/test/java/lang/invoke/VarHandles/accessibility/ |
D | TestFieldLookupAccessibility.java | 43 import java.lang.reflect.Modifier; 63 return !Modifier.isStatic(f.getModifiers()); in MH_GETTER() 72 return !Modifier.isStatic(f.getModifiers()) && !Modifier.isFinal(f.getModifiers()); in MH_SETTER() 81 return Modifier.isStatic(f.getModifiers()); in MH_STATIC_GETTER() 90 return Modifier.isStatic(f.getModifiers()) && !Modifier.isFinal(f.getModifiers()); in MH_STATIC_SETTER() 109 return f.isAccessible() || !Modifier.isFinal(f.getModifiers()); in MH_UNREFLECT_SETTER() 123 return !Modifier.isStatic(f.getModifiers()); in VH() 132 return Modifier.isStatic(f.getModifiers()); in VH_STATIC()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | LambdaImplementationTest.java | 29 import java.lang.reflect.Modifier; 282 if ((!Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers))) { in addNonStaticPublicMethods() 354 assertTrue(Modifier.isFinal(classModifiers)); in assertGeneralLambdaClassCharacteristics() 360 assertFalse(Modifier.isPrivate(classModifiers)); in assertGeneralLambdaClassCharacteristics() 361 assertFalse(Modifier.isProtected(classModifiers)); in assertGeneralLambdaClassCharacteristics() 362 assertFalse(Modifier.isStatic(classModifiers)); in assertGeneralLambdaClassCharacteristics() 363 assertFalse(Modifier.isSynchronized(classModifiers)); in assertGeneralLambdaClassCharacteristics() 364 assertFalse(Modifier.isVolatile(classModifiers)); in assertGeneralLambdaClassCharacteristics() 365 assertFalse(Modifier.isTransient(classModifiers)); in assertGeneralLambdaClassCharacteristics() 366 assertFalse(Modifier.isNative(classModifiers)); in assertGeneralLambdaClassCharacteristics() [all …]
|
/libcore/ojluni/src/main/java/sun/reflect/misc/ |
D | ReflectUtil.java | 30 import java.lang.reflect.Modifier; 61 if (target == null && Modifier.isProtected(modifiers)) { in ensureMemberAccess() 63 mods = mods & (~Modifier.PROTECTED); in ensureMemberAccess() 64 mods = mods | Modifier.PUBLIC; in ensureMemberAccess() 78 mods = mods & (~Modifier.PUBLIC); in ensureMemberAccess()
|
/libcore/ojluni/src/test/java/util/Properties/ |
D | CheckOverrides.java | 27 import java.lang.reflect.Modifier; 70 return !Modifier.isStatic(mods) && in isMethodOfInterest() 71 (Modifier.isPublic(mods) || Modifier.isProtected(mods)); in isMethodOfInterest()
|
/libcore/luni/src/test/java/libcore/sun/util/logging/ |
D | PlatformLoggerTest.java | 22 import java.lang.reflect.Modifier; 56 int requiredModifiers = Modifier.STATIC | Modifier.FINAL; in assertLogLevel()
|
/libcore/ojluni/src/main/java/com/sun/nio/file/ |
D | ExtendedWatchEventModifier.java | 28 import java.nio.file.WatchEvent.Modifier; 37 public enum ExtendedWatchEventModifier implements Modifier {
|
D | SensitivityWatchEventModifier.java | 28 import java.nio.file.WatchEvent.Modifier; 37 public enum SensitivityWatchEventModifier implements Modifier {
|
/libcore/ojluni/src/main/java/sun/invoke/util/ |
D | VerifyAccess.java | 28 import java.lang.reflect.Modifier; 29 import static java.lang.reflect.Modifier.*; 131 throw new IllegalArgumentException("bad modifiers: "+Modifier.toString(mods)); in isMemberAccessible() 180 if (Modifier.isPublic(refc.getModifiers())) in isClassAccessible()
|
/libcore/luni/src/main/java/libcore/util/ |
D | Objects.java | 20 import java.lang.reflect.Modifier; 37 if ((f.getModifiers() & (Modifier.STATIC | Modifier.TRANSIENT)) != 0) { in toString()
|