List of usage examples for org.objectweb.asm Opcodes ACC_ABSTRACT
int ACC_ABSTRACT
To view the source code for org.objectweb.asm Opcodes ACC_ABSTRACT.
Click Source Link
From source file:com.facebook.buck.jvm.java.abi.AccessFlagsTest.java
License:Apache License
@Test public void testAbstractFlagOnClass() throws IOException { testClassFlags("abstract", Opcodes.ACC_ABSTRACT); }
From source file:com.facebook.buck.jvm.java.abi.AccessFlagsTest.java
License:Apache License
@Test public void testAbstractFlagOnMethod() throws IOException { compile(Joiner.on('\n').join("abstract class Foo {", " abstract void foo();", "}")); assertEquals(Opcodes.ACC_ABSTRACT, accessFlags.getAccessFlags(findMethod("foo", elements.getTypeElement("Foo")))); }
From source file:com.facebook.buck.jvm.java.abi.AccessFlagsTest.java
License:Apache License
@Test public void testAnnotationTypeFlags() throws IOException { testTypeFlags("@java.lang.annotation.Documented @interface Foo { }", "Foo", Opcodes.ACC_ANNOTATION | Opcodes.ACC_INTERFACE | Opcodes.ACC_ABSTRACT); }
From source file:com.facebook.buck.jvm.java.abi.AccessFlagsTest.java
License:Apache License
@Test public void testInterfaceTypeFlags() throws IOException { testTypeFlags("interface Foo { }", "Foo", Opcodes.ACC_INTERFACE | Opcodes.ACC_ABSTRACT); }
From source file:com.facebook.buck.jvm.java.abi.SourceAbiCompatibleVisitor.java
License:Apache License
private static int stripAbstractFromEnums(int access) { if ((access & Opcodes.ACC_ENUM) == Opcodes.ACC_ENUM) { access = access & ~Opcodes.ACC_ABSTRACT; }// www .ja va2 s . co m return access; }
From source file:com.gargoylesoftware.js.nashorn.internal.ir.debug.NashornTextifier.java
License:Open Source License
private static void appendAccess(final StringBuilder sb, final int access) { if ((access & Opcodes.ACC_PUBLIC) != 0) { sb.append("public "); }/* w w w. j a v a2s . co m*/ if ((access & Opcodes.ACC_PRIVATE) != 0) { sb.append("private "); } if ((access & Opcodes.ACC_PROTECTED) != 0) { sb.append("protected "); } if ((access & Opcodes.ACC_FINAL) != 0) { sb.append("final "); } if ((access & Opcodes.ACC_STATIC) != 0) { sb.append("static "); } if ((access & Opcodes.ACC_SYNCHRONIZED) != 0) { sb.append("synchronized "); } if ((access & Opcodes.ACC_VOLATILE) != 0) { sb.append("volatile "); } if ((access & Opcodes.ACC_TRANSIENT) != 0) { sb.append("transient "); } if ((access & Opcodes.ACC_ABSTRACT) != 0) { sb.append("abstract "); } if ((access & Opcodes.ACC_STRICT) != 0) { sb.append("strictfp "); } if ((access & Opcodes.ACC_SYNTHETIC) != 0) { sb.append("synthetic "); } if ((access & Opcodes.ACC_MANDATED) != 0) { sb.append("mandated "); } if ((access & Opcodes.ACC_ENUM) != 0) { sb.append("enum "); } }
From source file:com.github.jasmo.obfuscate.FullAccessFlags.java
License:Open Source License
private int access(int access) { int a = Opcodes.ACC_PUBLIC; if ((access & Opcodes.ACC_NATIVE) != 0) a |= Opcodes.ACC_NATIVE;//from www .j a v a2 s .c o m if ((access & Opcodes.ACC_ABSTRACT) != 0) a |= Opcodes.ACC_ABSTRACT; if ((access & Opcodes.ACC_ANNOTATION) != 0) a |= Opcodes.ACC_ANNOTATION; if ((access & Opcodes.ACC_BRIDGE) != 0) a |= Opcodes.ACC_BRIDGE; //if ((access & Opcodes.ACC_DEPRECATED) != 0) a |= Opcodes.ACC_DEPRECATED; if ((access & Opcodes.ACC_ENUM) != 0) a |= Opcodes.ACC_ENUM; if ((access & Opcodes.ACC_FINAL) != 0) a |= Opcodes.ACC_FINAL; if ((access & Opcodes.ACC_INTERFACE) != 0) a |= Opcodes.ACC_INTERFACE; if ((access & Opcodes.ACC_MANDATED) != 0) a |= Opcodes.ACC_MANDATED; if ((access & Opcodes.ACC_MODULE) != 0) a |= Opcodes.ACC_MODULE; if ((access & Opcodes.ACC_OPEN) != 0) a |= Opcodes.ACC_OPEN; if ((access & Opcodes.ACC_STATIC) != 0) a |= Opcodes.ACC_STATIC; if ((access & Opcodes.ACC_STATIC_PHASE) != 0) a |= Opcodes.ACC_STATIC_PHASE; if ((access & Opcodes.ACC_STRICT) != 0) a |= Opcodes.ACC_STRICT; if ((access & Opcodes.ACC_SUPER) != 0) a |= Opcodes.ACC_SUPER; if ((access & Opcodes.ACC_SYNCHRONIZED) != 0) a |= Opcodes.ACC_SYNCHRONIZED; if ((access & Opcodes.ACC_SYNTHETIC) != 0) a |= Opcodes.ACC_SYNTHETIC; if ((access & Opcodes.ACC_TRANSIENT) != 0) a |= Opcodes.ACC_TRANSIENT; if ((access & Opcodes.ACC_TRANSITIVE) != 0) a |= Opcodes.ACC_TRANSITIVE; if ((access & Opcodes.ACC_VARARGS) != 0) a |= Opcodes.ACC_VARARGS; if ((access & Opcodes.ACC_VOLATILE) != 0) a |= Opcodes.ACC_VOLATILE; return a; }
From source file:com.github.nfalco79.junit4osgi.registry.internal.asm.BundleTestClassVisitor.java
License:Apache License
private boolean isAbstract(int access) { return (access & Opcodes.ACC_ABSTRACT) == Opcodes.ACC_ABSTRACT; }
From source file:com.google.devtools.build.android.desugar.CoreLibrarySupport.java
License:Open Source License
/** Includes the given method definition in any applicable core interface emulation logic. */ public void registerIfEmulatedCoreInterface(int access, String owner, String name, String desc, String[] exceptions) {//from w w w.ja va 2 s.c o m Class<?> emulated = getEmulatedCoreClassOrInterface(owner); if (emulated == null) { return; } checkArgument(emulated.isInterface(), "Shouldn't be called for a class: %s.%s", owner, name); checkArgument( BitFlags.noneSet(access, Opcodes.ACC_ABSTRACT | Opcodes.ACC_NATIVE | Opcodes.ACC_STATIC | Opcodes.ACC_BRIDGE), "Should only be called for default methods: %s.%s", owner, name); emulatedDefaultMethods.put(name + ":" + desc, EmulatedMethod.create(access, emulated, name, desc, exceptions)); }
From source file:com.google.devtools.build.android.desugar.DefaultMethodClassFixer.java
License:Open Source License
/** * Returns {@code true} for non-bridge default methods not in {@link #instanceMethods}. *///from w w w .j av a2 s .c o m private boolean shouldStub(int access, String name, String desc) { // Ignore private methods, which technically aren't default methods and can only be called from // other methods defined in the interface. This also ignores lambda body methods, which is fine // as we don't want or need to stub those. Also ignore bridge methods as javac adds them to // concrete classes as needed anyway and we handle them separately for generated lambda classes. return BitFlags.noneSet(access, Opcodes.ACC_ABSTRACT | Opcodes.ACC_STATIC | Opcodes.ACC_BRIDGE | Opcodes.ACC_PRIVATE) && !instanceMethods.contains(name + ":" + desc); }