本文整理了Java中org.objectweb.asm.tree.AnnotationNode
类的一些代码示例,展示了AnnotationNode
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AnnotationNode
类的具体详情如下:
包路径:org.objectweb.asm.tree.AnnotationNode
类名称:AnnotationNode
[英]A node that represents an annotation.
[中]表示注释的节点。
代码示例来源:origin: pxb1988/dex2jar
v =new AnnotationNode(unEscapeString((a!=null?a.getText():null)));
state._fsp--;
v.visit((t!=null?((JasminParser.sAnnotationElementSoot_return)t).nn:null),(t!=null?((JasminParser.sAnnotationElementSoot_return)t).v:null));
代码示例来源:origin: kilim/kilim
for (i = 0; i < n; ++i) {
AnnotationNode an = (AnnotationNode) mf.visibleAnnotations.get(i);
an.accept(mv.visitAnnotation(an.desc, true));
for (i = 0; i < n; ++i) {
AnnotationNode an = (AnnotationNode) mf.invisibleAnnotations.get(i);
an.accept(mv.visitAnnotation(an.desc, false));
an.accept(mv.visitParameterAnnotation(i, an.desc, true));
an.accept(mv.visitParameterAnnotation(i, an.desc, false));
代码示例来源: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: pxb1988/dex2jar
state._fsp--;
currentAnnotationVisitor.visit((t!=null?((JasminParser.sAnnotationElementSoot_return)t).nn:null),(t!=null?((JasminParser.sAnnotationElementSoot_return)t).v:null));
代码示例来源:origin: org.ow2.asm/asm-tree
visibleAnnotations.get(i).check(api);
invisibleAnnotations.get(i).check(api);
代码示例来源: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: kilim/kilim
public static void acceptAnnotation(final AnnotationVisitor av, final String name,
final Object value) {
if (value instanceof String[]) {
String[] typeconst = (String[]) value;
av.visitEnum(name, typeconst[0], typeconst[1]);
} else if (value instanceof AnnotationNode) {
AnnotationNode an = (AnnotationNode) value;
an.accept(av.visitAnnotation(name, an.desc));
} else if (value instanceof List<?>) {
AnnotationVisitor v = av.visitArray(name);
List<?> array = (List<?>) value;
for (int j = 0; j < array.size(); ++j) {
acceptAnnotation(v, null, array.get(j));
}
v.visitEnd();
} else {
av.visit(name, value);
}
}
代码示例来源:origin: pxb1988/dex2jar
_t.visit((a!=null?input.toString(a.start,a.stop):null),new String[]{(c!=null?c.getText():null),(b!=null?input.toString(b.start,b.stop):null)});
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();
state._fsp--;
_t.visit((a!=null?input.toString(a.start,a.stop):null),currentAnnotationVisitor);
currentAnnotationVisitor.visit((a!=null?input.toString(a.start,a.stop):null),Type.getType((b1!=null?input.toString(b1.start,b1.stop):null)));
match(input,148,FOLLOW_148_in_sAnnotationElement3539);
b3=(Token)match(input,STRING,FOLLOW_STRING_in_sAnnotationElement3543);
currentAnnotationVisitor.visit((a!=null?input.toString(a.start,a.stop):null),unEscapeString((b3!=null?b3.getText():null)));
match(input,148,FOLLOW_148_in_sAnnotationElement3568);
b4=(Token)match(input,INT,FOLLOW_INT_in_sAnnotationElement3572);
currentAnnotationVisitor.visit((a!=null?input.toString(a.start,a.stop):null),(byte)parseInt((b4!=null?b4.getText():null)));
match(input,148,FOLLOW_148_in_sAnnotationElement3593);
b5=(Token)match(input,INT,FOLLOW_INT_in_sAnnotationElement3597);
currentAnnotationVisitor.visit((a!=null?input.toString(a.start,a.stop):null),0!=parseInt((b5!=null?b5.getText():null)));
match(input,148,FOLLOW_148_in_sAnnotationElement3618);
b6=(Token)match(input,INT,FOLLOW_INT_in_sAnnotationElement3622);
currentAnnotationVisitor.visit((a!=null?input.toString(a.start,a.stop):null),(short)parseInt((b6!=null?b6.getText():null)));
代码示例来源: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: kilim/kilim
for (i = 0; i < n; ++i) {
an = (AnnotationNode) cf.visibleAnnotations.get(i);
an.accept(cv.visitAnnotation(an.desc, true));
for (i = 0; i < n; ++i) {
an = (AnnotationNode) cf.invisibleAnnotations.get(i);
an.accept(cv.visitAnnotation(an.desc, false));
代码示例来源: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.paralleluniverse/quasar
private static void dumpParameterAnnotations(MethodVisitor mv, List[] parameterAnnotations, boolean visible) {
for (int i = 0; i < parameterAnnotations.length; i++) {
if (parameterAnnotations[i] != null) {
for (Object o : parameterAnnotations[i]) {
AnnotationNode an = (AnnotationNode) o;
an.accept(mv.visitParameterAnnotation(i, an.desc, visible));
}
}
}
}
代码示例来源: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-tree
/**
* Makes the given visitor visit this annotation.
*
* @param annotationVisitor an annotation visitor. Maybe {@literal null}.
*/
public void accept(final AnnotationVisitor annotationVisitor) {
if (annotationVisitor != null) {
if (values != null) {
for (int i = 0, n = values.size(); i < n; i += 2) {
String name = (String) values.get(i);
Object value = values.get(i + 1);
accept(annotationVisitor, name, value);
}
}
annotationVisitor.visitEnd();
}
}
代码示例来源: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-debug-all
/**
* Makes the given visitor visit this annotation.
*
* @param av
* an annotation visitor. Maybe <tt>null</tt>.
*/
public void accept(final AnnotationVisitor av) {
if (av != null) {
if (values != null) {
for (int i = 0; i < values.size(); i += 2) {
String name = (String) values.get(i);
Object value = values.get(i + 1);
accept(av, name, value);
}
}
av.visitEnd();
}
}
代码示例来源: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
} else if (value instanceof AnnotationNode) {
AnnotationNode annotationValue = (AnnotationNode) value;
annotationValue.accept(annotationVisitor.visitAnnotation(name, annotationValue.desc));
} else if (value instanceof List) {
AnnotationVisitor arrayAnnotationVisitor = annotationVisitor.visitArray(name);
List<?> arrayValue = (List<?>) value;
for (int i = 0, n = arrayValue.size(); i < n; ++i) {
accept(arrayAnnotationVisitor, null, arrayValue.get(i));
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!