本文整理了Java中org.objectweb.asm.tree.AnnotationNode.<init>()
方法的一些代码示例,展示了AnnotationNode.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AnnotationNode.<init>()
方法的具体详情如下:
包路径:org.objectweb.asm.tree.AnnotationNode
类名称:AnnotationNode
方法名:<init>
[英]Constructs a new AnnotationNode.
[中]构造新的AnnotationNode。
代码示例来源:origin: pxb1988/dex2jar
b2=(Token)match(input,OBJECT_TYPE,FOLLOW_OBJECT_TYPE_in_sAnnotationElement3482);
match(input,148,FOLLOW_148_in_sAnnotationElement3484);
currentAnnotationVisitor=new AnnotationNode((b2!=null?b2.getText():null));
pushFollow(FOLLOW_sSubannotation_in_sAnnotationElement3488);
sSubannotation();
currentAnnotationVisitor=new AnnotationNode((b20!=null?b20.getText():null));
pushFollow(FOLLOW_sSubannotation_in_sAnnotationElement4133);
sSubannotation();
代码示例来源:origin: pxb1988/dex2jar
v =new AnnotationNode(unEscapeString((a!=null?a.getText():null)));
代码示例来源:origin: org.ow2.asm/asm-tree
@Override
@SuppressWarnings("serial")
public AnnotationVisitor visitAnnotationDefault() {
return new AnnotationNode(
new ArrayList<Object>(0) {
@Override
public boolean add(final Object o) {
annotationDefault = o;
return super.add(o);
}
});
}
代码示例来源:origin: qmx/jitescript
public VisibleAnnotation(String desc) {
this.node = new AnnotationNode(desc);
}
代码示例来源:origin: org.ow2.asm/asm-debug-all
@Override
@SuppressWarnings("serial")
public AnnotationVisitor visitAnnotationDefault() {
return new AnnotationNode(new ArrayList<Object>(0) {
@Override
public boolean add(final Object o) {
annotationDefault = o;
return super.add(o);
}
});
}
代码示例来源:origin: caskdata/cdap
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
// If the annotation is not visible or its not AuthEnforce just skip
if (!(visible && AuthEnforce.class.getName().equals(Type.getType(desc).getClassName()))) {
return null;
}
authEnforceAnnotationNode = new AnnotationNode(desc);
return authEnforceAnnotationNode;
}
代码示例来源:origin: org.ow2.asm/asm-debug-all
@Override
public AnnotationVisitor visitAnnotation(final String name,
final String desc) {
if (values == null) {
values = new ArrayList<Object>(this.desc != null ? 2 : 1);
}
if (this.desc != null) {
values.add(name);
}
AnnotationNode annotation = new AnnotationNode(desc);
values.add(annotation);
return annotation;
}
代码示例来源:origin: org.ow2.asm/asm-tree
@Override
public AnnotationVisitor visitAnnotation(final String name, final String descriptor) {
if (values == null) {
values = new ArrayList<Object>(this.desc != null ? 2 : 1);
}
if (this.desc != null) {
values.add(name);
}
AnnotationNode annotation = new AnnotationNode(descriptor);
values.add(annotation);
return annotation;
}
代码示例来源:origin: org.ow2.asm/asm-debug-all
@Override
public AnnotationVisitor visitArray(final String name) {
if (values == null) {
values = new ArrayList<Object>(this.desc != null ? 2 : 1);
}
if (this.desc != null) {
values.add(name);
}
List<Object> array = new ArrayList<Object>();
values.add(array);
return new AnnotationNode(array);
}
代码示例来源:origin: co.cask.cdap/cdap-common
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
// If the annotation is not visible or its not AuthEnforce just skip
if (!(visible && AuthEnforce.class.getName().equals(Type.getType(desc).getClassName()))) {
return null;
}
authEnforceAnnotationNode = new AnnotationNode(desc);
return authEnforceAnnotationNode;
}
代码示例来源:origin: org.ow2.asm/asm-tree
@Override
public AnnotationVisitor visitArray(final String name) {
if (values == null) {
values = new ArrayList<Object>(this.desc != null ? 2 : 1);
}
if (this.desc != null) {
values.add(name);
}
List<Object> array = new ArrayList<Object>();
values.add(array);
return new AnnotationNode(array);
}
代码示例来源:origin: MinecraftForge/ForgeGradle
private AnnotationNode getSideAnn(boolean isClientOnly)
{
AnnotationNode ann = new AnnotationNode(Type.getDescriptor(sideOnlyClass));
ann.values = new ArrayList<Object>();
ann.values.add("value");
ann.values.add(new String[] { Type.getDescriptor(sideClass), isClientOnly ? "CLIENT" : "SERVER" });
return ann;
}
代码示例来源:origin: org.ow2.asm/asm-tree
@Override
public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) {
AnnotationNode annotation = new AnnotationNode(descriptor);
if (visible) {
if (visibleAnnotations == null) {
visibleAnnotations = new ArrayList<AnnotationNode>(1);
}
visibleAnnotations.add(annotation);
} else {
if (invisibleAnnotations == null) {
invisibleAnnotations = new ArrayList<AnnotationNode>(1);
}
invisibleAnnotations.add(annotation);
}
return annotation;
}
代码示例来源:origin: org.ow2.asm/asm-tree
@Override
public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) {
AnnotationNode annotation = new AnnotationNode(descriptor);
if (visible) {
if (visibleAnnotations == null) {
visibleAnnotations = new ArrayList<AnnotationNode>(1);
}
visibleAnnotations.add(annotation);
} else {
if (invisibleAnnotations == null) {
invisibleAnnotations = new ArrayList<AnnotationNode>(1);
}
invisibleAnnotations.add(annotation);
}
return annotation;
}
代码示例来源:origin: co.cask.cdap/cdap-app-fabric
@Override
public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) {
// Memorize all visible annotations for each parameter.
// It needs to store in a Multimap because there can be multiple annotations per parameter.
if (visible) {
AnnotationNode annotationNode = new AnnotationNode(Opcodes.ASM5, desc);
paramAnnotations.put(parameter, annotationNode);
return annotationNode;
}
return super.visitParameterAnnotation(parameter, desc, visible);
}
代码示例来源:origin: org.ow2.asm/asm-tree
@Override
public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) {
AnnotationNode annotation = new AnnotationNode(descriptor);
if (visible) {
if (visibleAnnotations == null) {
visibleAnnotations = new ArrayList<AnnotationNode>(1);
}
visibleAnnotations.add(annotation);
} else {
if (invisibleAnnotations == null) {
invisibleAnnotations = new ArrayList<AnnotationNode>(1);
}
invisibleAnnotations.add(annotation);
}
return annotation;
}
代码示例来源:origin: cdapio/cdap
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
// Memorize all visible annotations
if (visible) {
AnnotationNode annotationNode = new AnnotationNode(Opcodes.ASM5, desc);
annotations.add(annotationNode);
return annotationNode;
}
return super.visitAnnotation(desc, visible);
}
代码示例来源:origin: cdapio/cdap
@Override
public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) {
// Memorize all visible annotations for each parameter.
// It needs to store in a Multimap because there can be multiple annotations per parameter.
if (visible) {
AnnotationNode annotationNode = new AnnotationNode(Opcodes.ASM5, desc);
paramAnnotations.put(parameter, annotationNode);
return annotationNode;
}
return super.visitParameterAnnotation(parameter, desc, visible);
}
代码示例来源:origin: co.cask.cdap/cdap-app-fabric
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
// Memorize all visible annotations
if (visible) {
AnnotationNode annotationNode = new AnnotationNode(Opcodes.ASM5, desc);
annotations.add(annotationNode);
return annotationNode;
}
return super.visitAnnotation(desc, visible);
}
代码示例来源:origin: org.multiverse/multiverse-instrumentation
private AnnotationNode createInstrumentedAnnotationNode() {
String desc = Type.getType(InstrumentationStamp.class).getDescriptor();
AnnotationNode annotationNode = new AnnotationNode(desc);
annotationNode.values = new LinkedList();
annotationNode.values.add(INSTRUMENTOR_NAME);
annotationNode.values.add(instrumentor.getName());
annotationNode.values.add(INSTRUMENTOR_VERSION);
annotationNode.values.add(instrumentor.getVersion());
return annotationNode;
}
}
内容来源于网络,如有侵权,请联系作者删除!