本文整理了Java中javassist.bytecode.Bytecode.addAnewarray()
方法的一些代码示例,展示了Bytecode.addAnewarray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytecode.addAnewarray()
方法的具体详情如下:
包路径:javassist.bytecode.Bytecode
类名称:Bytecode
方法名:addAnewarray
[英]Appends ANEWARRAY.
[中]附属物无尾蛇。
代码示例来源:origin: redisson/redisson
private void addNewarray(Bytecode code) {
if (type.isPrimitive())
code.addNewarray(((CtPrimitiveType)type).getArrayType(),
size);
else
code.addAnewarray(type, size);
}
代码示例来源:origin: org.javassist/javassist
private void addNewarray(Bytecode code) {
if (type.isPrimitive())
code.addNewarray(((CtPrimitiveType)type).getArrayType(),
size);
else
code.addAnewarray(type, size);
}
代码示例来源:origin: redisson/redisson
protected final int compileStringParameter(Bytecode code)
throws CannotCompileException
{
int nparam = stringParams.length;
code.addIconst(nparam);
code.addAnewarray(javaLangString);
for (int j = 0; j < nparam; ++j) {
code.add(Bytecode.DUP); // dup
code.addIconst(j); // iconst_<j>
code.addLdc(stringParams[j]); // ldc ...
code.add(Bytecode.AASTORE); // aastore
}
return 4;
}
代码示例来源:origin: redisson/redisson
private static void makeParameterList(Bytecode code, Class[] params) {
int regno = 1;
int n = params.length;
code.addIconst(n);
code.addAnewarray("java/lang/Object");
for (int i = 0; i < n; i++) {
code.addOpcode(Opcode.DUP);
code.addIconst(i);
Class type = params[i];
if (type.isPrimitive())
regno = makeWrapper(code, type, regno);
else {
code.addAload(regno);
regno++;
}
code.addOpcode(Opcode.AASTORE);
}
}
代码示例来源:origin: org.javassist/javassist
private static void makeParameterList(Bytecode code, Class<?>[] params) {
int regno = 1;
int n = params.length;
code.addIconst(n);
code.addAnewarray("java/lang/Object");
for (int i = 0; i < n; i++) {
code.addOpcode(Opcode.DUP);
code.addIconst(i);
Class<?> type = params[i];
if (type.isPrimitive())
regno = makeWrapper(code, type, regno);
else {
code.addAload(regno);
regno++;
}
code.addOpcode(Opcode.AASTORE);
}
}
代码示例来源:origin: org.javassist/javassist
protected final int compileStringParameter(Bytecode code)
throws CannotCompileException
{
int nparam = stringParams.length;
code.addIconst(nparam);
code.addAnewarray(javaLangString);
for (int j = 0; j < nparam; ++j) {
code.add(Bytecode.DUP); // dup
code.addIconst(j); // iconst_<j>
code.addLdc(stringParams[j]); // ldc ...
code.add(Bytecode.AASTORE); // aastore
}
return 4;
}
代码示例来源:origin: redisson/redisson
if (params == null) {
code.addIconst(0); // iconst_0
code.addAnewarray(javaLangObject); // anewarray Object
return 1;
int n = params.length;
code.addAnewarray(javaLangObject); // anewarray Object
for (int i = 0; i < n; ++i) {
代码示例来源:origin: redisson/redisson
code.addAnewarray("java.lang.reflect.Method");
final int varArray = 0;
code.addAstore(varArray);
代码示例来源:origin: org.javassist/javassist
if (params == null) {
code.addIconst(0); // iconst_0
code.addAnewarray(javaLangObject); // anewarray Object
return 1;
int n = params.length;
code.addAnewarray(javaLangObject); // anewarray Object
for (int i = 0; i < n; ++i) {
代码示例来源:origin: redisson/redisson
if (type == CLASS) {
elementClass = resolveClassName(jvmClassname);
bytecode.addAnewarray(MemberResolver.jvmToJavaName(elementClass));
代码示例来源:origin: org.javassist/javassist
code.addAnewarray("java.lang.reflect.Method");
final int varArray = 0;
code.addAstore(varArray);
代码示例来源:origin: org.javassist/javassist
if (type == CLASS) {
elementClass = resolveClassName(jvmClassname);
bytecode.addAnewarray(MemberResolver.jvmToJavaName(elementClass));
代码示例来源:origin: org.jboss/javassist
private void addNewarray(Bytecode code) {
if (type.isPrimitive())
code.addNewarray(((CtPrimitiveType)type).getArrayType(),
size);
else
code.addAnewarray(type, size);
}
代码示例来源:origin: org.jboss.javassist/com.springsource.javassist
private void addNewarray(Bytecode code) {
if (type.isPrimitive())
code.addNewarray(((CtPrimitiveType)type).getArrayType(),
size);
else
code.addAnewarray(type, size);
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
private void addNewarray(Bytecode code) {
if (type.isPrimitive())
code.addNewarray(((CtPrimitiveType)type).getArrayType(),
size);
else
code.addAnewarray(type, size);
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
private void addNewarray(Bytecode code) {
if (type.isPrimitive())
code.addNewarray(((CtPrimitiveType)type).getArrayType(),
size);
else
code.addAnewarray(type, size);
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
private void addNewarray(Bytecode code) {
if (type.isPrimitive())
code.addNewarray(((CtPrimitiveType)type).getArrayType(),
size);
else
code.addAnewarray(type, size);
}
代码示例来源:origin: org.jboss/javassist
protected final int compileStringParameter(Bytecode code)
throws CannotCompileException
{
int nparam = stringParams.length;
code.addIconst(nparam);
code.addAnewarray(javaLangString);
for (int j = 0; j < nparam; ++j) {
code.add(Bytecode.DUP); // dup
code.addIconst(j); // iconst_<j>
code.addLdc(stringParams[j]); // ldc ...
code.add(Bytecode.AASTORE); // aastore
}
return 4;
}
代码示例来源:origin: org.jboss.javassist/com.springsource.javassist
protected final int compileStringParameter(Bytecode code)
throws CannotCompileException
{
int nparam = stringParams.length;
code.addIconst(nparam);
code.addAnewarray(javaLangString);
for (int j = 0; j < nparam; ++j) {
code.add(Bytecode.DUP); // dup
code.addIconst(j); // iconst_<j>
code.addLdc(stringParams[j]); // ldc ...
code.add(Bytecode.AASTORE); // aastore
}
return 4;
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
protected final int compileStringParameter(Bytecode code)
throws CannotCompileException
{
int nparam = stringParams.length;
code.addIconst(nparam);
code.addAnewarray(javaLangString);
for (int j = 0; j < nparam; ++j) {
code.add(Bytecode.DUP); // dup
code.addIconst(j); // iconst_<j>
code.addLdc(stringParams[j]); // ldc ...
code.add(Bytecode.AASTORE); // aastore
}
return 4;
}
内容来源于网络,如有侵权,请联系作者删除!