Java 类org.objectweb.asm.Attribute 实例源码
项目:DirectLeaks-AntiReleak-Remover
文件:InjectorRemover.java
private static void attrRemover(ClassNode classNode) {
if (classNode.superName.equals("org/bukkit/plugin/java/JavaPlugin") || classNode.superName.equals("net/md_5/bungee/api/plugin/Plugin")) {
if (classNode.attrs != null) {
Iterator<Attribute> attributeIterator = classNode.attrs.iterator();
while (attributeIterator.hasNext()) {
Attribute attribute = attributeIterator.next();
if (attribute.type.equalsIgnoreCase("PluginVersion")) {
attributeIterator.remove();
}
if (attribute.type.equalsIgnoreCase("CompileVersion")) {
attributeIterator.remove();
}
}
}
}
}
项目:javify
文件:ASMStackMapTableAttribute.java
protected Attribute read(
ClassReader cr,
int off,
int len,
char[] buf,
int codeOff,
Label[] labels)
{
StackMapTableAttribute attr = (StackMapTableAttribute) super.read(cr,
off,
len,
buf,
codeOff,
labels);
return new ASMStackMapTableAttribute(attr.getFrames(), len);
}
项目:javify
文件:ASMStackMapAttribute.java
protected Attribute read(
ClassReader cr,
int off,
int len,
char[] buf,
int codeOff,
Label[] labels)
{
StackMapAttribute attr = (StackMapAttribute) super.read(cr,
off,
len,
buf,
codeOff,
labels);
return new ASMStackMapAttribute(attr.getFrames(), len);
}
项目:javify
文件:TraceMethodVisitor.java
public void visitAttribute(final Attribute attr) {
buf.setLength(0);
buf.append(tab).append("ATTRIBUTE ");
appendDescriptor(-1, attr.type);
if (attr instanceof Traceable) {
((Traceable) attr).trace(buf, labelNames);
} else {
buf.append(" : ").append(attr.toString()).append("\n");
}
text.add(buf.toString());
if (mv != null) {
mv.visitAttribute(attr);
}
}
项目:jvm-stm
文件:ASMStackMapTableAttribute.java
protected Attribute read(
ClassReader cr,
int off,
int len,
char[] buf,
int codeOff,
Label[] labels)
{
StackMapTableAttribute attr = (StackMapTableAttribute) super.read(cr,
off,
len,
buf,
codeOff,
labels);
return new ASMStackMapTableAttribute(attr.getFrames(), len);
}
项目:jvm-stm
文件:ASMStackMapAttribute.java
protected Attribute read(
ClassReader cr,
int off,
int len,
char[] buf,
int codeOff,
Label[] labels)
{
StackMapAttribute attr = (StackMapAttribute) super.read(cr,
off,
len,
buf,
codeOff,
labels);
return new ASMStackMapAttribute(attr.getFrames(), len);
}
项目:Simulare
文件:TransformMojo.java
@Override
public void visitAttribute(Attribute attr)
{
if ( attr.type.equals( SimulareAttribute.TYPE ) )
{
if ( transformed )
{
throw new IllegalStateException( "Duplicate Simulare attribute!" );
}
skipCount++;
transformed = true;
}
super.visitAttribute( attr );
}
项目:annotation-tools
文件:ASMStackMapTableAttribute.java
protected Attribute read(
ClassReader cr,
int off,
int len,
char[] buf,
int codeOff,
Label[] labels)
{
StackMapTableAttribute attr = (StackMapTableAttribute) super.read(cr,
off,
len,
buf,
codeOff,
labels);
return new ASMStackMapTableAttribute(attr.getFrames(), len);
}
项目:annotation-tools
文件:ASMStackMapAttribute.java
protected Attribute read(
ClassReader cr,
int off,
int len,
char[] buf,
int codeOff,
Label[] labels)
{
StackMapAttribute attr = (StackMapAttribute) super.read(cr,
off,
len,
buf,
codeOff,
labels);
return new ASMStackMapAttribute(attr.getFrames(), len);
}
项目:annotation-tools
文件:TraceMethodVisitor.java
public void visitAttribute(final Attribute attr) {
buf.setLength(0);
buf.append(tab).append("ATTRIBUTE ");
appendDescriptor(-1, attr.type);
if (attr instanceof Traceable) {
((Traceable) attr).trace(buf, labelNames);
} else {
buf.append(" : ").append(attr.toString()).append("\n");
}
text.add(buf.toString());
if (mv != null) {
mv.visitAttribute(attr);
}
}
项目:annotation-tools
文件:StackMapTableAttributeTest.java
public void test() throws Exception {
Attribute[] attributes = new Attribute[] { new ASMStackMapTableAttribute() };
ClassWriter cw = new ClassWriter(false);
ClassReader cr1 = new ClassReader(is);
cr1.accept(cw, attributes, true);
ClassReader cr2 = new ClassReader(cw.toByteArray());
if (!Arrays.equals(cr1.b, cr2.b)) {
StringWriter sw1 = new StringWriter();
StringWriter sw2 = new StringWriter();
ClassVisitor cv1 = new TraceClassVisitor(new PrintWriter(sw1));
ClassVisitor cv2 = new TraceClassVisitor(new PrintWriter(sw2));
cr1.accept(cv1, attributes, true);
cr2.accept(cv2, attributes, true);
assertEquals("different data", sw1.toString(), sw2.toString());
}
}
项目:DirectLeaks-AntiReleak-Remover
文件:FieldNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:DirectLeaks-AntiReleak-Remover
文件:ClassNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:DirectLeaks-AntiReleak-Remover
文件:MethodNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:DirectLeaks-AntiReleak-Remover
文件:CheckFieldAdapter.java
@Override
public void visitAttribute(final Attribute attr) {
checkEnd();
if (attr == null) {
throw new IllegalArgumentException(
"Invalid attribute (must not be null)");
}
super.visitAttribute(attr);
}
项目:DirectLeaks-AntiReleak-Remover
文件:ASMifier.java
public void visitAttribute(final Attribute attr) {
buf.setLength(0);
buf.append("// ATTRIBUTE ").append(attr.type).append('\n');
if (attr instanceof ASMifiable) {
if (labelNames == null) {
labelNames = new HashMap<Label, String>();
}
buf.append("{\n");
((ASMifiable) attr).asmify(buf, "attr", labelNames);
buf.append(name).append(".visitAttribute(attr);\n");
buf.append("}\n");
}
text.add(buf.toString());
}
项目:DirectLeaks-AntiReleak-Remover
文件:CheckClassAdapter.java
@Override
public void visitAttribute(final Attribute attr) {
checkState();
if (attr == null) {
throw new IllegalArgumentException(
"Invalid attribute (must not be null)");
}
super.visitAttribute(attr);
}
项目:DirectLeaks-AntiReleak-Remover
文件:Textifier.java
@Override
public void visitMethodAttribute(final Attribute attr) {
buf.setLength(0);
buf.append(tab).append("ATTRIBUTE ");
appendDescriptor(-1, attr.type);
if (attr instanceof Textifiable) {
((Textifiable) attr).textify(buf, labelNames);
} else {
buf.append(" : unknown\n");
}
text.add(buf.toString());
}
项目:DirectLeaks-AntiReleak-Remover
文件:Textifier.java
/**
* Prints a disassembled view of the given attribute.
*
* @param attr
* an attribute.
*/
public void visitAttribute(final Attribute attr) {
buf.setLength(0);
buf.append(tab).append("ATTRIBUTE ");
appendDescriptor(-1, attr.type);
if (attr instanceof Textifiable) {
((Textifiable) attr).textify(buf, null);
} else {
buf.append(" : unknown\n");
}
text.add(buf.toString());
}
项目:DirectLeaks-AntiReleak-Remover
文件:CheckMethodAdapter.java
@Override
public void visitAttribute(final Attribute attr) {
checkEndMethod();
if (attr == null) {
throw new IllegalArgumentException(
"Invalid attribute (must not be null)");
}
super.visitAttribute(attr);
}
项目:Spigot-Nonce-ID-Finder
文件:FieldNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:Spigot-Nonce-ID-Finder
文件:ClassNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:Spigot-Nonce-ID-Finder
文件:MethodNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:BukkitPlugin-Message-Injector
文件:FieldNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:BukkitPlugin-Message-Injector
文件:ClassNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:BukkitPlugin-Message-Injector
文件:MethodNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:Simple-JAR-Watermark
文件:FieldNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:Simple-JAR-Watermark
文件:ClassNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:Simple-JAR-Watermark
文件:MethodNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:Spigot-Attribute-Remover
文件:FieldNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:Spigot-Attribute-Remover
文件:ClassNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:Spigot-Attribute-Remover
文件:MethodNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:fastAOP
文件:FieldNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:fastAOP
文件:ClassNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:fastAOP
文件:MethodNode.java
@Override
public void visitAttribute(final Attribute attr) {
if (attrs == null) {
attrs = new ArrayList<Attribute>(1);
}
attrs.add(attr);
}
项目:fastAOP
文件:CheckFieldAdapter.java
@Override
public void visitAttribute(final Attribute attr) {
checkEnd();
if (attr == null) {
throw new IllegalArgumentException(
"Invalid attribute (must not be null)");
}
super.visitAttribute(attr);
}
项目:fastAOP
文件:ASMifier.java
public void visitAttribute(final Attribute attr) {
buf.setLength(0);
buf.append("// ATTRIBUTE ").append(attr.type).append('\n');
if (attr instanceof ASMifiable) {
if (labelNames == null) {
labelNames = new HashMap<Label, String>();
}
buf.append("{\n");
((ASMifiable) attr).asmify(buf, "attr", labelNames);
buf.append(name).append(".visitAttribute(attr);\n");
buf.append("}\n");
}
text.add(buf.toString());
}
项目:fastAOP
文件:CheckClassAdapter.java
@Override
public void visitAttribute(final Attribute attr) {
checkState();
if (attr == null) {
throw new IllegalArgumentException(
"Invalid attribute (must not be null)");
}
super.visitAttribute(attr);
}
项目:fastAOP
文件:Textifier.java
@Override
public void visitMethodAttribute(final Attribute attr) {
buf.setLength(0);
buf.append(tab).append("ATTRIBUTE ");
appendDescriptor(-1, attr.type);
if (attr instanceof Textifiable) {
((Textifiable) attr).textify(buf, labelNames);
} else {
buf.append(" : unknown\n");
}
text.add(buf.toString());
}
项目:fastAOP
文件:Textifier.java
/**
* Prints a disassembled view of the given attribute.
*
* @param attr
* an attribute.
*/
public void visitAttribute(final Attribute attr) {
buf.setLength(0);
buf.append(tab).append("ATTRIBUTE ");
appendDescriptor(-1, attr.type);
if (attr instanceof Textifiable) {
((Textifiable) attr).textify(buf, null);
} else {
buf.append(" : unknown\n");
}
text.add(buf.toString());
}