本文整理汇总了Java中jdk.internal.org.objectweb.asm.signature.SignatureReader.acceptType方法的典型用法代码示例。如果您正苦于以下问题:Java SignatureReader.acceptType方法的具体用法?Java SignatureReader.acceptType怎么用?Java SignatureReader.acceptType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jdk.internal.org.objectweb.asm.signature.SignatureReader
的用法示例。
在下文中一共展示了SignatureReader.acceptType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitLocalVariable
import jdk.internal.org.objectweb.asm.signature.SignatureReader; //导入方法依赖的package包/类
@Override
public void visitLocalVariable(final String name, final String desc,
final String signature, final Label start, final Label end,
final int index) {
buf.setLength(0);
buf.append(tab2).append("LOCALVARIABLE ").append(name).append(' ');
appendDescriptor(FIELD_DESCRIPTOR, desc);
buf.append(' ');
appendLabel(start);
buf.append(' ');
appendLabel(end);
buf.append(' ').append(index).append('\n');
if (signature != null) {
buf.append(tab2);
appendDescriptor(FIELD_SIGNATURE, signature);
TraceSignatureVisitor sv = new TraceSignatureVisitor(0);
SignatureReader r = new SignatureReader(signature);
r.acceptType(sv);
buf.append(tab2).append("// declaration: ")
.append(sv.getDeclaration()).append('\n');
}
text.add(buf.toString());
}
示例2: mapSignature
import jdk.internal.org.objectweb.asm.signature.SignatureReader; //导入方法依赖的package包/类
/**
*
* @param typeSignature
* true if signature is a FieldTypeSignature, such as the
* signature parameter of the ClassVisitor.visitField or
* MethodVisitor.visitLocalVariable methods
*/
public String mapSignature(String signature, boolean typeSignature) {
if (signature == null) {
return null;
}
SignatureReader r = new SignatureReader(signature);
SignatureWriter w = new SignatureWriter();
SignatureVisitor a = createRemappingSignatureAdapter(w);
if (typeSignature) {
r.acceptType(a);
} else {
r.accept(a);
}
return w.toString();
}
示例3: mapSignature
import jdk.internal.org.objectweb.asm.signature.SignatureReader; //导入方法依赖的package包/类
/**
* @param signature
* signature for mapper
* @param typeSignature
* true if signature is a FieldTypeSignature, such as the
* signature parameter of the ClassVisitor.visitField or
* MethodVisitor.visitLocalVariable methods
* @return signature rewritten as a string
*/
public String mapSignature(String signature, boolean typeSignature) {
if (signature == null) {
return null;
}
SignatureReader r = new SignatureReader(signature);
SignatureWriter w = new SignatureWriter();
SignatureVisitor a = createSignatureRemapper(w);
if (typeSignature) {
r.acceptType(a);
} else {
r.accept(a);
}
return w.toString();
}
示例4: mapSignature
import jdk.internal.org.objectweb.asm.signature.SignatureReader; //导入方法依赖的package包/类
/**
*
* @param typeSignature true if signature is a FieldTypeSignature, such as
* the signature parameter of the ClassVisitor.visitField or
* MethodVisitor.visitLocalVariable methods
*/
public String mapSignature(String signature, boolean typeSignature) {
if (signature == null) {
return null;
}
SignatureReader r = new SignatureReader(signature);
SignatureWriter w = new SignatureWriter();
SignatureVisitor a = createRemappingSignatureAdapter(w);
if (typeSignature) {
r.acceptType(a);
} else {
r.accept(a);
}
return w.toString();
}
示例5: visitLocalVariable
import jdk.internal.org.objectweb.asm.signature.SignatureReader; //导入方法依赖的package包/类
@Override
public void visitLocalVariable(
final String name,
final String desc,
final String signature,
final Label start,
final Label end,
final int index)
{
buf.setLength(0);
buf.append(tab2).append("LOCALVARIABLE ").append(name).append(' ');
appendDescriptor(FIELD_DESCRIPTOR, desc);
buf.append(' ');
appendLabel(start);
buf.append(' ');
appendLabel(end);
buf.append(' ').append(index).append('\n');
if (signature != null) {
buf.append(tab2);
appendDescriptor(FIELD_SIGNATURE, signature);
TraceSignatureVisitor sv = new TraceSignatureVisitor(0);
SignatureReader r = new SignatureReader(signature);
r.acceptType(sv);
buf.append(tab2)
.append("// declaration: ")
.append(sv.getDeclaration())
.append('\n');
}
text.add(buf.toString());
}
示例6: visitField
import jdk.internal.org.objectweb.asm.signature.SignatureReader; //导入方法依赖的package包/类
@Override
public Textifier visitField(final int access, final String name,
final String desc, final String signature, final Object value) {
buf.setLength(0);
buf.append('\n');
if ((access & Opcodes.ACC_DEPRECATED) != 0) {
buf.append(tab).append("// DEPRECATED\n");
}
buf.append(tab).append("// access flags 0x")
.append(Integer.toHexString(access).toUpperCase()).append('\n');
if (signature != null) {
buf.append(tab);
appendDescriptor(FIELD_SIGNATURE, signature);
TraceSignatureVisitor sv = new TraceSignatureVisitor(0);
SignatureReader r = new SignatureReader(signature);
r.acceptType(sv);
buf.append(tab).append("// declaration: ")
.append(sv.getDeclaration()).append('\n');
}
buf.append(tab);
appendAccess(access);
appendDescriptor(FIELD_DESCRIPTOR, desc);
buf.append(' ').append(name);
if (value != null) {
buf.append(" = ");
if (value instanceof String) {
buf.append('\"').append(value).append('\"');
} else {
buf.append(value);
}
}
buf.append('\n');
text.add(buf.toString());
Textifier t = createTextifier();
text.add(t.getText());
return t;
}
示例7: visitField
import jdk.internal.org.objectweb.asm.signature.SignatureReader; //导入方法依赖的package包/类
@Override
public NashornTextifier visitField(final int access, final String name, final String desc, final String signature, final Object value) {
final StringBuilder sb = new StringBuilder();
// sb.append('\n');
if ((access & Opcodes.ACC_DEPRECATED) != 0) {
sb.append(tab).append("// DEPRECATED\n");
}
/* sb.append(tab).
append("// access flags 0x").
append(Integer.toHexString(access).toUpperCase()).
append('\n');
*/
if (signature != null) {
sb.append(tab);
appendDescriptor(sb, FIELD_SIGNATURE, signature);
final TraceSignatureVisitor sv = new TraceSignatureVisitor(0);
final SignatureReader r = new SignatureReader(signature);
r.acceptType(sv);
sb.append(tab).
append("// declaration: ").
append(sv.getDeclaration()).
append('\n');
}
sb.append(tab);
appendAccess(sb, access);
final String prunedDesc = desc.endsWith(";") ? desc.substring(0, desc.length() - 1) : desc;
appendDescriptor(sb, FIELD_DESCRIPTOR, prunedDesc);
sb.append(' ').append(name);
if (value != null) {
sb.append(" = ");
if (value instanceof String) {
sb.append('\"').append(value).append('\"');
} else {
sb.append(value);
}
}
sb.append(";\n");
addText(sb);
final NashornTextifier t = createNashornTextifier();
addText(t.getText());
return t;
}
示例8: visitLocalVariable
import jdk.internal.org.objectweb.asm.signature.SignatureReader; //导入方法依赖的package包/类
@Override
public void visitLocalVariable(final String name, final String desc,final String signature, final Label start, final Label end, final int index) {
final StringBuilder sb = new StringBuilder();
if (!localVarsStarted) {
text.add("\n");
localVarsStarted = true;
graph.addNode("vars");
currentBlock = "vars";
}
sb.append(tab2).append("local ").append(name).append(' ');
final int len = sb.length();
for (int i = 0; i < 25 - len; i++) {
sb.append(' ');
}
String label;
label = appendLabel(sb, start);
for (int i = 0; i < 5 - label.length(); i++) {
sb.append(' ');
}
label = appendLabel(sb, end);
for (int i = 0; i < 5 - label.length(); i++) {
sb.append(' ');
}
sb.append(index).append(tab2);
appendDescriptor(sb, FIELD_DESCRIPTOR, desc);
sb.append('\n');
if (signature != null) {
sb.append(tab2);
appendDescriptor(sb, FIELD_SIGNATURE, signature);
final TraceSignatureVisitor sv = new TraceSignatureVisitor(0);
final SignatureReader r = new SignatureReader(signature);
r.acceptType(sv);
sb.append(tab2).append("// declaration: ")
.append(sv.getDeclaration()).append('\n');
}
addText(sb.toString());
}
示例9: visitField
import jdk.internal.org.objectweb.asm.signature.SignatureReader; //导入方法依赖的package包/类
@Override
public Textifier visitField(
final int access,
final String name,
final String desc,
final String signature,
final Object value)
{
buf.setLength(0);
buf.append('\n');
if ((access & Opcodes.ACC_DEPRECATED) != 0) {
buf.append(tab).append("// DEPRECATED\n");
}
buf.append(tab).append("// access flags 0x").append(Integer.toHexString(access).toUpperCase()).append('\n');
if (signature != null) {
buf.append(tab);
appendDescriptor(FIELD_SIGNATURE, signature);
TraceSignatureVisitor sv = new TraceSignatureVisitor(0);
SignatureReader r = new SignatureReader(signature);
r.acceptType(sv);
buf.append(tab)
.append("// declaration: ")
.append(sv.getDeclaration())
.append('\n');
}
buf.append(tab);
appendAccess(access);
appendDescriptor(FIELD_DESCRIPTOR, desc);
buf.append(' ').append(name);
if (value != null) {
buf.append(" = ");
if (value instanceof String) {
buf.append('\"').append(value).append('\"');
} else {
buf.append(value);
}
}
buf.append('\n');
text.add(buf.toString());
Textifier t = createTextifier();
text.add(t.getText());
return t;
}