List of usage examples for org.objectweb.asm Opcodes ACC_TRANSIENT
int ACC_TRANSIENT
To view the source code for org.objectweb.asm Opcodes ACC_TRANSIENT.
Click Source Link
From source file:com.googlecode.dex2jar.ir.ToStringUtil.java
License:Apache License
public static String getAccDes(int acc) { StringBuilder sb = new StringBuilder(); if ((acc & Opcodes.ACC_PUBLIC) != 0) { sb.append("public "); }// w w w .j a v a 2 s . co m if ((acc & Opcodes.ACC_PROTECTED) != 0) { sb.append("protected "); } if ((acc & Opcodes.ACC_PRIVATE) != 0) { sb.append("private "); } if ((acc & Opcodes.ACC_STATIC) != 0) { sb.append("static "); } if ((acc & Opcodes.ACC_ABSTRACT) != 0 && (acc & Opcodes.ACC_INTERFACE) == 0) { sb.append("abstract "); } if ((acc & Opcodes.ACC_ANNOTATION) != 0) { sb.append("annotation "); } if ((acc & Opcodes.ACC_BRIDGE) != 0) { sb.append("bridge "); } if ((acc & Opcodes.ACC_DEPRECATED) != 0) { sb.append("deprecated "); } if ((acc & Opcodes.ACC_ENUM) != 0) { sb.append("enum "); } if ((acc & Opcodes.ACC_FINAL) != 0) { sb.append("final "); } if ((acc & Opcodes.ACC_INTERFACE) != 0) { sb.append("interace "); } if ((acc & Opcodes.ACC_NATIVE) != 0) { sb.append("native "); } if ((acc & Opcodes.ACC_STRICT) != 0) { sb.append("strict "); } if ((acc & Opcodes.ACC_SYNCHRONIZED) != 0) { sb.append("synchronized "); } if ((acc & Opcodes.ACC_TRANSIENT) != 0) { sb.append("transient "); } if ((acc & Opcodes.ACC_VARARGS) != 0) { sb.append("varargs "); } if ((acc & Opcodes.ACC_VOLATILE) != 0) { sb.append("volatile "); } return sb.toString(); }
From source file:com.googlecode.dex2jar.tools.JarAccessCmd.java
License:Apache License
static int str2acc(String s) { if (s == null) { return 0; }/*w ww . j a v a2 s.com*/ int result = 0; s = s.toLowerCase(); if (s.contains("public")) { result |= Opcodes.ACC_PUBLIC; } if (s.contains("private")) { result |= Opcodes.ACC_PRIVATE; } if (s.contains("protected")) { result |= Opcodes.ACC_PROTECTED; } if (s.contains("final")) { result |= Opcodes.ACC_FINAL; } if (s.contains("static")) { result |= Opcodes.ACC_STATIC; } if (s.contains("super")) { result |= Opcodes.ACC_SUPER; } if (s.contains("synchronized")) { result |= Opcodes.ACC_SYNCHRONIZED; } if (s.contains("volatile")) { result |= Opcodes.ACC_VOLATILE; } if (s.contains("bridge")) { result |= Opcodes.ACC_BRIDGE; } if (s.contains("transient")) { result |= Opcodes.ACC_TRANSIENT; } if (s.contains("varargs")) { result |= Opcodes.ACC_VARARGS; } if (s.contains("native")) { result |= Opcodes.ACC_NATIVE; } if (s.contains("strict")) { result |= Opcodes.ACC_STRICT; } if (s.contains("interface")) { result |= Opcodes.ACC_INTERFACE; } if (s.contains("abstract")) { result |= Opcodes.ACC_ABSTRACT; } if (s.contains("synthetic")) { result |= Opcodes.ACC_SYNTHETIC; } if (s.contains("annotation")) { result |= Opcodes.ACC_ANNOTATION; } if (s.contains("enum")) { result |= Opcodes.ACC_ENUM; } if (s.contains("deprecated")) { result |= Opcodes.ACC_DEPRECATED; } return result; }
From source file:com.googlecode.japi.checker.model.JavaItem.java
License:Apache License
protected JavaItem(ClassDataLoader loader, ClassData owner, int access, String name) { this.setOwner(owner); this.setName(name); this.setVisibility(toScope(access)); this.setAbstract((access & Opcodes.ACC_ABSTRACT) == Opcodes.ACC_ABSTRACT); this.setInterface((access & Opcodes.ACC_INTERFACE) == Opcodes.ACC_INTERFACE); this.setFinal((access & Opcodes.ACC_FINAL) == Opcodes.ACC_FINAL); this.setStatic((access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC); this.setTransient((access & Opcodes.ACC_TRANSIENT) == Opcodes.ACC_TRANSIENT); this.setVariableArity((access & Opcodes.ACC_VARARGS) == Opcodes.ACC_VARARGS); this.setClassDataLoader(loader); }
From source file:com.masetta.spann.metadata.reader.asm3_2.FieldModifierImpl.java
License:Apache License
/** * <p>isTrasient</p> * * @return a boolean. */ public boolean isTrasient() { return (modifier & Opcodes.ACC_TRANSIENT) != 0; }
From source file:com.poolik.classfinder.info.ClassInfo.java
License:BSD License
/** * Convert an ASM access mask to a reflection Modifier mask. * * @param asmAccessMask the ASM access mask * @return the Modifier mask/*from w ww .ja v a 2 s . co m*/ */ private int convertAccessMaskToModifierMask(int asmAccessMask) { int modifier = 0; // Convert the ASM access info into Reflection API modifiers. if ((asmAccessMask & Opcodes.ACC_FINAL) != 0) modifier |= Modifier.FINAL; if ((asmAccessMask & Opcodes.ACC_NATIVE) != 0) modifier |= Modifier.NATIVE; if ((asmAccessMask & Opcodes.ACC_INTERFACE) != 0) modifier |= Modifier.INTERFACE; if ((asmAccessMask & Opcodes.ACC_ABSTRACT) != 0) modifier |= Modifier.ABSTRACT; if ((asmAccessMask & Opcodes.ACC_PRIVATE) != 0) modifier |= Modifier.PRIVATE; if ((asmAccessMask & Opcodes.ACC_PROTECTED) != 0) modifier |= Modifier.PROTECTED; if ((asmAccessMask & Opcodes.ACC_PUBLIC) != 0) modifier |= Modifier.PUBLIC; if ((asmAccessMask & Opcodes.ACC_STATIC) != 0) modifier |= Modifier.STATIC; if ((asmAccessMask & Opcodes.ACC_STRICT) != 0) modifier |= Modifier.STRICT; if ((asmAccessMask & Opcodes.ACC_SYNCHRONIZED) != 0) modifier |= Modifier.SYNCHRONIZED; if ((asmAccessMask & Opcodes.ACC_TRANSIENT) != 0) modifier |= Modifier.TRANSIENT; if ((asmAccessMask & Opcodes.ACC_VOLATILE) != 0) modifier |= Modifier.VOLATILE; return modifier; }
From source file:graph.Modifier.java
License:Apache License
/** * Returns an integer bit field for the EnumSet, where the bit values are * defined as in the class file format.//from ww w .j a v a 2 s . com * * @param set Set of modifiers to convert to a bit field. * @return Integer bit field. */ public static int getBitField(EnumSet<Modifier> set) { int access = 0; if (set.contains(PUBLIC)) { access |= Opcodes.ACC_PUBLIC; } if (set.contains(PROTECTED)) { access |= Opcodes.ACC_PROTECTED; } if (set.contains(PRIVATE)) { access |= Opcodes.ACC_PRIVATE; } if (set.contains(STATIC)) { access |= Opcodes.ACC_STATIC; } if (set.contains(FINAL)) { access |= Opcodes.ACC_FINAL; } if (set.contains(SUPER)) { access |= Opcodes.ACC_SUPER; } if (set.contains(INTERFACE)) { access |= Opcodes.ACC_INTERFACE; } if (set.contains(ABSTRACT)) { access |= Opcodes.ACC_ABSTRACT; } if (set.contains(SYNTHETIC)) { access |= Opcodes.ACC_SYNTHETIC; } if (set.contains(ANNOTATION)) { access |= Opcodes.ACC_ANNOTATION; } if (set.contains(ENUM)) { access |= Opcodes.ACC_ENUM; } if (set.contains(VOLATILE)) { access |= Opcodes.ACC_VOLATILE; } if (set.contains(TRANSIENT)) { access |= Opcodes.ACC_TRANSIENT; } if (set.contains(SYNCHRONIZED)) { access |= Opcodes.ACC_SYNCHRONIZED; } if (set.contains(BRIDGE)) { access |= Opcodes.ACC_BRIDGE; } if (set.contains(VARARGS)) { access |= Opcodes.ACC_VARARGS; } if (set.contains(NATIVE)) { access |= Opcodes.ACC_NATIVE; } return access; }
From source file:graph.Modifier.java
License:Apache License
/** * Returns an EnumSet of the modifiers, based on the given bit field (where * the bit values are defined as in the class file format). * * @param access Integer bit field giving access modifiers. * @return Set of modifiers.//from www . j a v a2 s.c o m */ public static EnumSet<Modifier> getSet(int access) { EnumSet<Modifier> modifiers = EnumSet.noneOf(Modifier.class); if ((access & Opcodes.ACC_PUBLIC) != 0) { modifiers.add(Modifier.PUBLIC); } if ((access & Opcodes.ACC_PROTECTED) != 0) { modifiers.add(Modifier.PROTECTED); } if ((access & Opcodes.ACC_PRIVATE) != 0) { modifiers.add(Modifier.PRIVATE); } if ((access & Opcodes.ACC_STATIC) != 0) { modifiers.add(Modifier.STATIC); } if ((access & Opcodes.ACC_FINAL) != 0) { modifiers.add(Modifier.FINAL); } if ((access & Opcodes.ACC_SUPER) != 0) { modifiers.add(Modifier.SUPER); } if ((access & Opcodes.ACC_INTERFACE) != 0) { modifiers.add(Modifier.INTERFACE); } if ((access & Opcodes.ACC_ABSTRACT) != 0) { modifiers.add(Modifier.ABSTRACT); } if ((access & Opcodes.ACC_SYNTHETIC) != 0) { modifiers.add(Modifier.SYNTHETIC); } if ((access & Opcodes.ACC_ANNOTATION) != 0) { modifiers.add(Modifier.ANNOTATION); } if ((access & Opcodes.ACC_ENUM) != 0) { modifiers.add(Modifier.ENUM); } if ((access & Opcodes.ACC_VOLATILE) != 0) { modifiers.add(Modifier.VOLATILE); } if ((access & Opcodes.ACC_TRANSIENT) != 0) { modifiers.add(Modifier.TRANSIENT); } if ((access & Opcodes.ACC_SYNCHRONIZED) != 0) { modifiers.add(Modifier.SYNCHRONIZED); } if ((access & Opcodes.ACC_BRIDGE) != 0) { modifiers.add(Modifier.BRIDGE); } if ((access & Opcodes.ACC_VARARGS) != 0) { modifiers.add(Modifier.VARARGS); } if ((access & Opcodes.ACC_NATIVE) != 0) { modifiers.add(Modifier.NATIVE); } if ((access & Opcodes.ACC_STRICT) != 0) { modifiers.add(Modifier.STRICT); } return modifiers; }
From source file:net.sourceforge.cobertura.instrument.pass3.AtomicArrayCodeProvider.java
License:GNU General Public License
public void generateCountersField(ClassVisitor cv) { FieldVisitor fv = cv.visitField(/*from www .j a v a 2 s . com*/ Opcodes.ACC_STATIC | Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL | Opcodes.ACC_TRANSIENT, COBERTURA_COUNTERS_FIELD_NAME, COBERTURA_COUNTERS_FIELD_TYPE, null, null); fv.visitEnd(); }
From source file:net.sourceforge.cobertura.instrument.pass3.FastArrayCodeProvider.java
License:GNU General Public License
public void generateCountersField(ClassVisitor cv) { /*final tooks 270ms, no-modifier 310ms, volatile 500ms*/ FieldVisitor fv = cv.visitField(//from w w w .j a v a 2 s . c o m Opcodes.ACC_STATIC | Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL | Opcodes.ACC_TRANSIENT, COBERTURA_COUNTERS_FIELD_NAME, COBERTURA_COUNTERS_FIELD_TYPE, null, null); fv.visitEnd(); }
From source file:net.sourceforge.cobertura.instrument.pass3.TestUnitCodeProvider.java
License:GNU General Public License
/** * Generates:/*from w ww . j a v a 2s.c o m*/ * public static final transient Map __cobertura_counters; */ public void generateCountersField(ClassVisitor cv) { FieldVisitor fv = cv.visitField( Opcodes.ACC_STATIC | Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL | Opcodes.ACC_TRANSIENT, COBERTURA_COUNTERS_FIELD_NAME, COBERTURA_COUNTERS_FIELD_TYPE, null, null); fv.visitEnd(); }