Home
last modified time | relevance | path

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

123

/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 …]
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()
DMalformedParameterizedTypeExceptionTests.java5 import java.lang.reflect.Modifier;
16 assertTrue("Constructor is not protected", Modifier.isPublic(ctor in test_Constructor()
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()
/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 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 …]
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()
DReflectionTest.java27 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/
DModifier.java43 public class Modifier { class
149 return ((modifiers & Modifier.CONSTRUCTOR) != 0); in isConstructor()
399 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE |
400 Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL |
401 Modifier.STRICT;
408 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE |
409 Modifier.ABSTRACT | Modifier.STATIC | Modifier.STRICT;
417 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE;
424 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE |
425 Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL |
[all …]
DExecutable.java86 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 …]
DField.java87 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()
DParameter.java131 sb.append(Modifier.toString(getModifiers())); in toString()
241 return Modifier.isMandated(getModifiers()); in isImplicit()
255 return Modifier.isSynthetic(getModifiers()); in isSynthetic()
/libcore/ojluni/src/test/java/time/test/java/time/
DAbstractTest.java68 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/
DFieldVarHandle.java20 import java.lang.reflect.Modifier;
30 super(field.getType(), Modifier.isFinal(field.getModifiers()), declaringClass); in FieldVarHandle()
35 super(field.getType(), Modifier.isFinal(field.getModifiers())); in FieldVarHandle()
40 if (Modifier.isStatic(field.getModifiers())) { in create()
/libcore/ojluni/src/main/java/java/io/
DObjectStreamClass.java37 import java.lang.reflect.Modifier;
1400 return ((cons.getModifiers() & Modifier.PUBLIC) != 0) ? in getExternalizableConstructor()
1422 if ((mods & Modifier.PRIVATE) != 0 || in getSerializableConstructor()
1423 ((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) == 0 && in getSerializableConstructor()
1467 if ((mods & (Modifier.STATIC | Modifier.ABSTRACT)) != 0) { in getInheritableMethod()
1469 } else if ((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) != 0) { in getInheritableMethod()
1471 } else if ((mods & Modifier.PRIVATE) != 0) { in getInheritableMethod()
1492 ((mods & Modifier.STATIC) == 0) && in getPrivateMethod()
1493 ((mods & Modifier.PRIVATE) != 0)) ? meth : null; in getPrivateMethod()
1644 int mask = Modifier.PRIVATE | Modifier.STATIC | Modifier.FINAL; in getDeclaredSerialFields()
[all …]
/libcore/ojluni/src/main/java/sun/reflect/
DReflection.java125 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/luni/src/test/java/libcore/java/lang/
DLambdaImplementationTest.java29 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/
DReflectUtil.java30 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/main/java/com/sun/nio/file/
DExtendedWatchEventModifier.java28 import java.nio.file.WatchEvent.Modifier;
37 public enum ExtendedWatchEventModifier implements Modifier {
DSensitivityWatchEventModifier.java28 import java.nio.file.WatchEvent.Modifier;
37 public enum SensitivityWatchEventModifier implements Modifier {
/libcore/luni/src/test/java/libcore/sun/util/logging/
DPlatformLoggerTest.java22 import java.lang.reflect.Modifier;
56 int requiredModifiers = Modifier.STATIC | Modifier.FINAL; in assertLogLevel()
/libcore/ojluni/src/main/java/sun/invoke/util/
DVerifyAccess.java28 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/ojluni/src/main/java/java/lang/invoke/
DMethodHandles.java519 public static final int PUBLIC = Modifier.PUBLIC;
526 public static final int PRIVATE = Modifier.PRIVATE;
533 public static final int PROTECTED = Modifier.PROTECTED;
540 public static final int PACKAGE = Modifier.STATIC;
784 if (!Modifier.isStatic(modifiers)) { in findStatic()
917 if (Modifier.isStatic(m.getModifiers())) { in findVirtual()
1150 if (Modifier.isStatic(method.getModifiers())) { in findSpecial()
1154 if (Modifier.isPrivate(method.getModifiers())) { in findSpecial()
1219 if (isSetterKind && Modifier.isFinal(modifiers)) { in findAccessor()
1377 if (Modifier.isStatic(modifiers) != isStatic) { in commonFieldChecks()
[all …]
/libcore/luni/src/main/java/libcore/util/
DObjects.java20 import java.lang.reflect.Modifier;
37 if ((f.getModifiers() & (Modifier.STATIC | Modifier.TRANSIENT)) != 0) { in toString()
/libcore/ojluni/src/main/java/sun/nio/fs/
DAbstractPoller.java80 WatchEvent.Modifier... modifiers); in implRegister()
97 WatchEvent.Modifier... modifiers) in register()
258 WatchEvent.Modifier[] modifiers = in processRequests()
259 (WatchEvent.Modifier[])params[2]; in processRequests()
/libcore/ojluni/src/main/java/java/lang/
DClass.java42 import java.lang.reflect.Modifier;
307 int modifiers = getModifiers() & Modifier.classModifiers(); in toGenericString()
309 sb.append(Modifier.toString(modifiers)); in toGenericString()
608 return (accessFlags & Modifier.INTERFACE) != 0; in isInterface()
1098 if ((componentModifiers & Modifier.INTERFACE) != 0) { in getModifiers()
1099 componentModifiers &= ~(Modifier.INTERFACE | Modifier.STATIC); in getModifiers()
1101 return Modifier.ABSTRACT | Modifier.FINAL | componentModifiers; in getModifiers()
1362 if (Modifier.isPublic(member.getModifiers())) { in getClasses()
2070 (recursivePublicMethods && !Modifier.isPublic(result.getAccessFlags()))) { in getMethod()
2080 if (result != null && Modifier.isPublic(result.getAccessFlags())) { in getPublicMethodRecursive()
[all …]

123