org.objectweb.asm.TypePath#fromString ( )源码实例Demo

下面列出了org.objectweb.asm.TypePath#fromString ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: JByteMod-Beta   文件: ASMContentHandler.java
@Override
public void begin(final String name, final Attributes attrs) {
  String desc = attrs.getValue("desc");
  boolean visible = Boolean.valueOf(attrs.getValue("visible")).booleanValue();
  int typeRef = Integer.parseInt(attrs.getValue("typeRef"));
  TypePath typePath = TypePath.fromString(attrs.getValue("typePath"));

  Object v = peek();
  if (v instanceof ClassVisitor) {
    push(((ClassVisitor) v).visitTypeAnnotation(typeRef, typePath, desc, visible));
  } else if (v instanceof FieldVisitor) {
    push(((FieldVisitor) v).visitTypeAnnotation(typeRef, typePath, desc, visible));
  } else if (v instanceof MethodVisitor) {
    push(((MethodVisitor) v).visitTypeAnnotation(typeRef, typePath, desc, visible));
  }
}
 
源代码2 项目: JByteMod-Beta   文件: ASMContentHandler.java
@Override
public void begin(final String name, final Attributes attrs) {
  String desc = attrs.getValue("desc");
  boolean visible = Boolean.valueOf(attrs.getValue("visible")).booleanValue();
  int typeRef = Integer.parseInt(attrs.getValue("typeRef"));
  TypePath typePath = TypePath.fromString(attrs.getValue("typePath"));
  String[] s = attrs.getValue("start").split(" ");
  Label[] start = new Label[s.length];
  for (int i = 0; i < start.length; ++i) {
    start[i] = getLabel(s[i]);
  }
  String[] e = attrs.getValue("end").split(" ");
  Label[] end = new Label[e.length];
  for (int i = 0; i < end.length; ++i) {
    end[i] = getLabel(e[i]);
  }
  String[] v = attrs.getValue("index").split(" ");
  int[] index = new int[v.length];
  for (int i = 0; i < index.length; ++i) {
    index[i] = Integer.parseInt(v[i]);
  }
  push(((MethodVisitor) peek()).visitLocalVariableAnnotation(typeRef, typePath, start, end, index, desc, visible));
}
 
源代码3 项目: JByteMod-Beta   文件: ASMContentHandler.java
@Override
public void begin(final String name, final Attributes attrs) {
  String desc = attrs.getValue("desc");
  boolean visible = Boolean.valueOf(attrs.getValue("visible")).booleanValue();
  int typeRef = Integer.parseInt(attrs.getValue("typeRef"));
  TypePath typePath = TypePath.fromString(attrs.getValue("typePath"));
  push(((MethodVisitor) peek()).visitInsnAnnotation(typeRef, typePath, desc, visible));
}
 
源代码4 项目: JByteMod-Beta   文件: ASMContentHandler.java
@Override
public void begin(final String name, final Attributes attrs) {
  String desc = attrs.getValue("desc");
  boolean visible = Boolean.valueOf(attrs.getValue("visible")).booleanValue();
  int typeRef = Integer.parseInt(attrs.getValue("typeRef"));
  TypePath typePath = TypePath.fromString(attrs.getValue("typePath"));
  push(((MethodVisitor) peek()).visitTryCatchAnnotation(typeRef, typePath, desc, visible));
}
 
 方法所在类
 同类方法