本文整理汇总了Java中com.sun.xml.internal.ws.org.objectweb.asm.Type类的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Type类属于com.sun.xml.internal.ws.org.objectweb.asm包,在下文中一共展示了Type类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getHolderValueType
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
@Override
protected java.lang.reflect.Type getHolderValueType(java.lang.reflect.Type paramType) {
if (paramType instanceof ParameterizedType) {
ParameterizedType p = (ParameterizedType)paramType;
if (p.getRawType().equals(Holder.class)) {
return p.getActualTypeArguments()[0];
}
}
return null;
}
示例2: getASMType
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
private static Type getASMType(java.lang.reflect.Type t) {
assert t!=null;
if (t instanceof Class) {
return Type.getType((Class)t);
}
if (t instanceof ParameterizedType) {
ParameterizedType pt = (ParameterizedType)t;
if (pt.getRawType() instanceof Class) {
return Type.getType((Class)pt.getRawType());
}
}
if (t instanceof GenericArrayType) {
return Type.getType(FieldSignature.vms(t));
}
if (t instanceof WildcardType) {
return Type.getType(FieldSignature.vms(t));
}
if (t instanceof TypeVariable) {
TypeVariable tv = (TypeVariable)t;
if (tv.getBounds()[0] instanceof Class) {
return Type.getType((Class)tv.getBounds()[0]);
}
}
throw new IllegalArgumentException("Not creating ASM Type for type = "+t);
}
示例3: Field
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
Field(String paramName, java.lang.reflect.Type paramType, Type asmType,
List<Annotation> jaxbAnnotations) {
this.reflectType = paramType;
this.asmType = asmType;
this.fieldName = paramName;
this.jaxbAnnotations = jaxbAnnotations;
}
示例4: DataObjInfo
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
public DataObjInfo(int version, int access, String name, String signature, String superName, String[] interfaces) {
this.name = name;
Type type = Type.getObjectType(this.name);
this.desc = type.getDescriptor();
this.dynName = this.name.replaceAll("\\$", "/") + DataConstant.DYNSIGN;
this.dynDesc = Type.getObjectType(this.dynName).getDescriptor();
}
示例5: getRefactoredNameByType
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
public String getRefactoredNameByType(String desc) {
String objectname = Type.getType(desc).toString();
if (objectname.length() < 3)
return null;
return getRefactoredName(objectname.substring(1, objectname.length() - 1));
}
示例6: createGetter
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
protected final void createGetter(ClassNode cn, FieldNode fn, String name) {
MethodVisitor mv = cn.visitMethod(Opcodes.ACC_PUBLIC, name, "()" + fn.desc, null, null);
mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitFieldInsn(Opcodes.GETFIELD, cn.name, fn.name, fn.desc);
mv.visitInsn(Type.getType(fn.desc).getOpcode(Opcodes.IRETURN));
mv.visitMaxs(0, 0);
mv.visitEnd();
}
示例7: createSetter
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
protected final void createSetter(ClassNode cn, FieldNode fn, String name) {
MethodVisitor mv = cn.visitMethod(Opcodes.ACC_PUBLIC, name, "(" + fn.desc + ")V", null, null);
mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitVarInsn(Type.getType(fn.desc).getOpcode(Opcodes.ILOAD), 1);
mv.visitFieldInsn(Opcodes.PUTFIELD, cn.name, fn.name, fn.desc);
mv.visitInsn(Opcodes.RETURN);
mv.visitMaxs(0, 0);
mv.visitEnd();
}
示例8: run
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
@Override
public void run(ClassNode cn) {
MethodVisitor mv = cn.visitMethod(Opcodes.ACC_PUBLIC, "getPosition",
"()" + "Lme/themallard/bitmmo/impl/plugin/position/IPosition;", null, null);
mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitFieldInsn(Opcodes.GETFIELD, "Entity", "position", "LPosition;");
mv.visitInsn(Type.getType("Lme/themallard/bitmmo/impl/plugin/position/IPosition;").getOpcode(Opcodes.IRETURN));
mv.visitMaxs(0, 0);
mv.visitEnd();
}
示例9: getHolderValueType
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
protected java.lang.reflect.Type getHolderValueType(java.lang.reflect.Type paramType) {
if (paramType instanceof ParameterizedType) {
ParameterizedType p = (ParameterizedType)paramType;
if (p.getRawType().equals(Holder.class)) {
return p.getActualTypeArguments()[0];
}
}
return null;
}
示例10: RuntimeWrapperBeanGenerator
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
protected RuntimeWrapperBeanGenerator(AnnotationReader<java.lang.reflect.Type, Class, ?, Method> annReader, Navigator<java.lang.reflect.Type, Class, ?, Method> nav, BeanMemberFactory<java.lang.reflect.Type, Field> beanMemberFactory) {
super(annReader, nav, beanMemberFactory);
}
示例11: getSafeType
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
@Override
protected java.lang.reflect.Type getSafeType(java.lang.reflect.Type type) {
return type;
}
示例12: isVoidType
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
@Override
protected boolean isVoidType(java.lang.reflect.Type type) {
return type == Void.TYPE;
}
示例13: createWrapperBeanMember
import com.sun.xml.internal.ws.org.objectweb.asm.Type; //导入依赖的package包/类
@Override
public Field createWrapperBeanMember(java.lang.reflect.Type paramType,
String paramName, List<Annotation> jaxb) {
return new Field(paramName, paramType, getASMType(paramType), jaxb);
}