当前位置: 首页>>代码示例>>Java>>正文


Java Type类代码示例

本文整理汇总了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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:WrapperBeanGenerator.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:WrapperBeanGenerator.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:WrapperBeanGenerator.java

示例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();
}
 
开发者ID:myking520,项目名称:gamefm,代码行数:8,代码来源:DataObjInfo.java

示例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));
}
 
开发者ID:8BitPlus,项目名称:BitPlus,代码行数:9,代码来源:ClassAnalyser.java

示例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();
}
 
开发者ID:8BitPlus,项目名称:BitPlus,代码行数:9,代码来源:Transformer.java

示例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();
}
 
开发者ID:8BitPlus,项目名称:BitPlus,代码行数:10,代码来源:Transformer.java

示例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();
}
 
开发者ID:8BitPlus,项目名称:BitPlus,代码行数:11,代码来源:PlayerPlugin.java

示例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;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:10,代码来源:WrapperBeanGenerator.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:WrapperBeanGenerator.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:WrapperBeanGenerator.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:WrapperBeanGenerator.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:WrapperBeanGenerator.java


注:本文中的com.sun.xml.internal.ws.org.objectweb.asm.Type类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。