本文整理汇总了Java中jdk.internal.org.objectweb.asm.TypePath类的典型用法代码示例。如果您正苦于以下问题:Java TypePath类的具体用法?Java TypePath怎么用?Java TypePath使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TypePath类属于jdk.internal.org.objectweb.asm包,在下文中一共展示了TypePath类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: visitTypeAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
TypePath typePath, String desc, boolean visible) {
TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
if (visible) {
if (visibleTypeAnnotations == null) {
visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
}
visibleTypeAnnotations.add(an);
} else {
if (invisibleTypeAnnotations == null) {
invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
}
invisibleTypeAnnotations.add(an);
}
return an;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:MethodNode.java
示例2: visitInsnAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitInsnAnnotation(int typeRef,
TypePath typePath, String desc, boolean visible) {
// Finds the last real instruction, i.e. the instruction targeted by
// this annotation.
AbstractInsnNode insn = instructions.getLast();
while (insn.getOpcode() == -1) {
insn = insn.getPrevious();
}
// Adds the annotation to this instruction.
TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
if (visible) {
if (insn.visibleTypeAnnotations == null) {
insn.visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(
1);
}
insn.visibleTypeAnnotations.add(an);
} else {
if (insn.invisibleTypeAnnotations == null) {
insn.invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(
1);
}
insn.invisibleTypeAnnotations.add(an);
}
return an;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:MethodNode.java
示例3: visitTryCatchAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTryCatchAnnotation(int typeRef,
TypePath typePath, String desc, boolean visible) {
TryCatchBlockNode tcb = tryCatchBlocks.get((typeRef & 0x00FFFF00) >> 8);
TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
if (visible) {
if (tcb.visibleTypeAnnotations == null) {
tcb.visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(
1);
}
tcb.visibleTypeAnnotations.add(an);
} else {
if (tcb.invisibleTypeAnnotations == null) {
tcb.invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(
1);
}
tcb.invisibleTypeAnnotations.add(an);
}
return an;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:MethodNode.java
示例4: visitLocalVariableAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
TypePath typePath, Label[] start, Label[] end, int[] index,
String desc, boolean visible) {
LocalVariableAnnotationNode an = new LocalVariableAnnotationNode(
typeRef, typePath, getLabelNodes(start), getLabelNodes(end),
index, desc);
if (visible) {
if (visibleLocalVariableAnnotations == null) {
visibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
1);
}
visibleLocalVariableAnnotations.add(an);
} else {
if (invisibleLocalVariableAnnotations == null) {
invisibleLocalVariableAnnotations = new ArrayList<LocalVariableAnnotationNode>(
1);
}
invisibleLocalVariableAnnotations.add(an);
}
return an;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:MethodNode.java
示例5: visitTypeAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTypeAnnotation(final int typeRef,
final TypePath typePath, final String desc, final boolean visible) {
checkState();
int sort = typeRef >>> 24;
if (sort != TypeReference.CLASS_TYPE_PARAMETER
&& sort != TypeReference.CLASS_TYPE_PARAMETER_BOUND
&& sort != TypeReference.CLASS_EXTENDS) {
throw new IllegalArgumentException("Invalid type reference sort 0x"
+ Integer.toHexString(sort));
}
checkTypeRefAndPath(typeRef, typePath);
CheckMethodAdapter.checkDesc(desc, false);
return new CheckAnnotationAdapter(super.visitTypeAnnotation(typeRef,
typePath, desc, visible));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:CheckClassAdapter.java
示例6: visitLocalVariableAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public Printer visitLocalVariableAnnotation(int typeRef, TypePath typePath,
Label[] start, Label[] end, int[] index, String desc,
boolean visible) {
buf.setLength(0);
buf.append(tab2).append("LOCALVARIABLE @");
appendDescriptor(FIELD_DESCRIPTOR, desc);
buf.append('(');
text.add(buf.toString());
Textifier t = createTextifier();
text.add(t.getText());
buf.setLength(0);
buf.append(") : ");
appendTypeReference(typeRef);
buf.append(", ").append(typePath);
for (int i = 0; i < start.length; ++i) {
buf.append(" [ ");
appendLabel(start[i]);
buf.append(" - ");
appendLabel(end[i]);
buf.append(" - ").append(index[i]).append(" ]");
}
buf.append(visible ? "\n" : " // invisible\n");
text.add(buf.toString());
return t;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:Textifier.java
示例7: visitTypeAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
/**
* Prints a disassembled view of the given type annotation.
*
* @param typeRef
* a reference to the annotated type. See {@link TypeReference}.
* @param typePath
* the path to the annotated type argument, wildcard bound, array
* element type, or static inner type within 'typeRef'. May be
* <tt>null</tt> if the annotation targets 'typeRef' as a whole.
* @param desc
* the class descriptor of the annotation class.
* @param visible
* <tt>true</tt> if the annotation is visible at runtime.
* @return a visitor to visit the annotation values.
*/
public Textifier visitTypeAnnotation(final int typeRef,
final TypePath typePath, final String desc, final boolean visible) {
buf.setLength(0);
buf.append(tab).append('@');
appendDescriptor(FIELD_DESCRIPTOR, desc);
buf.append('(');
text.add(buf.toString());
Textifier t = createTextifier();
text.add(t.getText());
buf.setLength(0);
buf.append(") : ");
appendTypeReference(typeRef);
buf.append(", ").append(typePath);
buf.append(visible ? "\n" : " // invisible\n");
text.add(buf.toString());
return t;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:Textifier.java
示例8: visitTypeAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTypeAnnotation(final int typeRef,
final TypePath typePath, final String desc, final boolean visible) {
checkEndMethod();
int sort = typeRef >>> 24;
if (sort != TypeReference.METHOD_TYPE_PARAMETER
&& sort != TypeReference.METHOD_TYPE_PARAMETER_BOUND
&& sort != TypeReference.METHOD_RETURN
&& sort != TypeReference.METHOD_RECEIVER
&& sort != TypeReference.METHOD_FORMAL_PARAMETER
&& sort != TypeReference.THROWS) {
throw new IllegalArgumentException("Invalid type reference sort 0x"
+ Integer.toHexString(sort));
}
CheckClassAdapter.checkTypeRefAndPath(typeRef, typePath);
CheckMethodAdapter.checkDesc(desc, false);
return new CheckAnnotationAdapter(super.visitTypeAnnotation(typeRef,
typePath, desc, visible));
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:CheckMethodAdapter.java
示例9: visitTryCatchAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public Printer visitTryCatchAnnotation(int typeRef, TypePath typePath,
String desc, boolean visible) {
buf.setLength(0);
buf.append(tab2).append("TRYCATCHBLOCK @");
appendDescriptor(FIELD_DESCRIPTOR, desc);
buf.append('(');
text.add(buf.toString());
Textifier t = createTextifier();
text.add(t.getText());
buf.setLength(0);
buf.append(") : ");
appendTypeReference(typeRef);
buf.append(", ").append(typePath);
buf.append(visible ? "\n" : " // invisible\n");
text.add(buf.toString());
return t;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:Textifier.java
示例10: visitTypeAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef,
TypePath typePath, String desc, boolean visible) {
AnnotationVisitor av = super.visitTypeAnnotation(typeRef, typePath,
remapper.mapDesc(desc), visible);
return av == null ? av : new RemappingAnnotationAdapter(av, remapper);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:RemappingMethodAdapter.java
示例11: visitTryCatchAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTryCatchAnnotation(int typeRef,
TypePath typePath, String desc, boolean visible) {
AnnotationVisitor av = super.visitTryCatchAnnotation(typeRef, typePath,
remapper.mapDesc(desc), visible);
return av == null ? av : new RemappingAnnotationAdapter(av, remapper);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:RemappingMethodAdapter.java
示例12: visitLocalVariableAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
TypePath typePath, Label[] start, Label[] end, int[] index,
String desc, boolean visible) {
AnnotationVisitor av = super.visitLocalVariableAnnotation(typeRef,
typePath, start, end, index, remapper.mapDesc(desc), visible);
return av == null ? av : new RemappingAnnotationAdapter(av, remapper);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:RemappingMethodAdapter.java
示例13: visitLocalVariableAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
TypePath typePath, Label[] start, Label[] end, int[] index,
String desc, boolean visible) {
Printer p = this.p.visitLocalVariableAnnotation(typeRef, typePath,
start, end, index, desc, visible);
AnnotationVisitor av = mv == null ? null : mv
.visitLocalVariableAnnotation(typeRef, typePath, start, end,
index, desc, visible);
return new TraceAnnotationVisitor(av, p);
}
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:12,代码来源:TraceMethodVisitor.java
示例14: visitLocalVariableAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
TypePath typePath, Label[] start, Label[] end, int[] index,
String desc, boolean visible) {
checkStartCode();
checkEndCode();
int sort = typeRef >>> 24;
if (sort != TypeReference.LOCAL_VARIABLE
&& sort != TypeReference.RESOURCE_VARIABLE) {
throw new IllegalArgumentException("Invalid type reference sort 0x"
+ Integer.toHexString(sort));
}
CheckClassAdapter.checkTypeRefAndPath(typeRef, typePath);
checkDesc(desc, false);
if (start == null || end == null || index == null
|| end.length != start.length || index.length != start.length) {
throw new IllegalArgumentException(
"Invalid start, end and index arrays (must be non null and of identical length");
}
for (int i = 0; i < start.length; ++i) {
checkLabel(start[i], true, "start label");
checkLabel(end[i], true, "end label");
checkUnsignedShort(index[i], "Invalid variable index");
int s = labels.get(start[i]).intValue();
int e = labels.get(end[i]).intValue();
if (e < s) {
throw new IllegalArgumentException(
"Invalid start and end labels (end must be greater than start)");
}
}
return super.visitLocalVariableAnnotation(typeRef, typePath, start,
end, index, desc, visible);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:34,代码来源:CheckMethodAdapter.java
示例15: visitTypeAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTypeAnnotation(final int typeRef,
final TypePath typePath, final String desc, final boolean visible) {
checkEnd();
int sort = typeRef >>> 24;
if (sort != TypeReference.FIELD) {
throw new IllegalArgumentException("Invalid type reference sort 0x"
+ Integer.toHexString(sort));
}
CheckClassAdapter.checkTypeRefAndPath(typeRef, typePath);
CheckMethodAdapter.checkDesc(desc, false);
return new CheckAnnotationAdapter(super.visitTypeAnnotation(typeRef,
typePath, desc, visible));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:CheckFieldAdapter.java
示例16: visitLocalVariableAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public Printer visitLocalVariableAnnotation(int typeRef, TypePath typePath,
Label[] start, Label[] end, int[] index, String desc,
boolean visible) {
buf.setLength(0);
buf.append("{\n").append("av0 = ").append(name)
.append(".visitLocalVariableAnnotation(");
buf.append(typeRef);
buf.append(", TypePath.fromString(\"").append(typePath).append("\"), ");
buf.append("new Label[] {");
for (int i = 0; i < start.length; ++i) {
buf.append(i == 0 ? " " : ", ");
appendLabel(start[i]);
}
buf.append(" }, new Label[] {");
for (int i = 0; i < end.length; ++i) {
buf.append(i == 0 ? " " : ", ");
appendLabel(end[i]);
}
buf.append(" }, new int[] {");
for (int i = 0; i < index.length; ++i) {
buf.append(i == 0 ? " " : ", ").append(index[i]);
}
buf.append(" }, ");
appendConstant(desc);
buf.append(", ").append(visible).append(");\n");
text.add(buf.toString());
ASMifier a = createASMifier("av", 0);
text.add(a.getText());
text.add("}\n");
return a;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:ASMifier.java
示例17: visitTypeAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
public ASMifier visitTypeAnnotation(final String method, final int typeRef,
final TypePath typePath, final String desc, final boolean visible) {
buf.setLength(0);
buf.append("{\n").append("av0 = ").append(name).append(".")
.append(method).append("(");
buf.append(typeRef);
buf.append(", TypePath.fromString(\"").append(typePath).append("\"), ");
appendConstant(desc);
buf.append(", ").append(visible).append(");\n");
text.add(buf.toString());
ASMifier a = createASMifier("av", 0);
text.add(a.getText());
text.add("}\n");
return a;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:ASMifier.java
示例18: visitInsnAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitInsnAnnotation(int typeRef,
TypePath typePath, String desc, boolean visible) {
Printer p = this.p
.visitInsnAnnotation(typeRef, typePath, desc, visible);
AnnotationVisitor av = mv == null ? null : mv.visitInsnAnnotation(
typeRef, typePath, desc, visible);
return new TraceAnnotationVisitor(av, p);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:TraceMethodVisitor.java
示例19: visitTryCatchAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitTryCatchAnnotation(final int typeRef,
final TypePath typePath, final String desc, final boolean visible) {
checkStartCode();
checkEndCode();
int sort = typeRef >>> 24;
if (sort != TypeReference.EXCEPTION_PARAMETER) {
throw new IllegalArgumentException("Invalid type reference sort 0x"
+ Integer.toHexString(sort));
}
CheckClassAdapter.checkTypeRefAndPath(typeRef, typePath);
CheckMethodAdapter.checkDesc(desc, false);
return new CheckAnnotationAdapter(super.visitTryCatchAnnotation(
typeRef, typePath, desc, visible));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:CheckMethodAdapter.java
示例20: visitLocalVariableAnnotation
import jdk.internal.org.objectweb.asm.TypePath; //导入依赖的package包/类
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
TypePath typePath, Label[] start, Label[] end, int[] index,
String desc, boolean visible) {
AnnotationVisitor av = super.visitLocalVariableAnnotation(typeRef,
typePath, start, end, index, remapper.mapDesc(desc), visible);
return av == null ? av : new AnnotationRemapper(av, remapper);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:MethodRemapper.java
注:本文中的jdk.internal.org.objectweb.asm.TypePath类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论