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


Java FieldTypeSignature类代码示例

本文整理汇总了Java中sun.reflect.generics.tree.FieldTypeSignature的典型用法代码示例。如果您正苦于以下问题:Java FieldTypeSignature类的具体用法?Java FieldTypeSignature怎么用?Java FieldTypeSignature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FieldTypeSignature类属于sun.reflect.generics.tree包,在下文中一共展示了FieldTypeSignature类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getExceptionTypes

import sun.reflect.generics.tree.FieldTypeSignature; //导入依赖的package包/类
public Type[] getExceptionTypes(){
    if (exceptionTypes == null) { // lazily initialize exception types
        // first, extract exception type subtree(s) from AST
        FieldTypeSignature[] ets = getTree().getExceptionTypes();
        // create array to store reified subtree(s)
        Type[] es = new Type[ets.length];
        // reify all subtrees
        for (int i = 0; i < ets.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            ets[i].accept(r); // reify subtree
            // extract result from visitor and store it
            es[i] = r.getResult();
        }
        exceptionTypes = es; // cache overall result
    }
    return exceptionTypes.clone(); // return cached result
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:18,代码来源:ConstructorRepository.java

示例2: TypeVariableImpl

import sun.reflect.generics.tree.FieldTypeSignature; //导入依赖的package包/类
private TypeVariableImpl(D decl, String n, FieldTypeSignature[] bs,
                         GenericsFactory f) {
    super(f);
    genericDeclaration = decl;
    name = n;
    boundASTs = bs;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:TypeVariableImpl.java

示例3: WildcardTypeImpl

import sun.reflect.generics.tree.FieldTypeSignature; //导入依赖的package包/类
private WildcardTypeImpl(FieldTypeSignature[] ubs,
                         FieldTypeSignature[] lbs,
                         GenericsFactory f) {
    super(f);
    upperBoundASTs = ubs;
    lowerBoundASTs = lbs;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:WildcardTypeImpl.java

示例4: make

import sun.reflect.generics.tree.FieldTypeSignature; //导入依赖的package包/类
/**
 * Factory method.
 * @param decl - the reflective object that declared the type variable
 * that this method should create
 * @param name - the name of the type variable to be returned
 * @param bs - an array of ASTs representing the bounds for the type
 * variable to be created
 * @param f - a factory that can be used to manufacture reflective
 * objects that represent the bounds of this type variable
 * @return A type variable with name, bounds, declaration and factory
 * specified
 */
public static <T extends GenericDeclaration>
                         TypeVariableImpl<T> make(T decl, String name,
                                                  FieldTypeSignature[] bs,
                                                  GenericsFactory f) {

    if (!((decl instanceof Class) ||
            (decl instanceof Method) ||
            (decl instanceof Constructor))) {
        throw new AssertionError("Unexpected kind of GenericDeclaration" +
                decl.getClass().toString());
    }
    return new TypeVariableImpl<T>(decl, name, bs, f);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:TypeVariableImpl.java

示例5: computeExceptionTypes

import sun.reflect.generics.tree.FieldTypeSignature; //导入依赖的package包/类
private Type[] computeExceptionTypes() {
    // first, extract exception type subtree(s) from AST
    FieldTypeSignature[] ets = getTree().getExceptionTypes();
    // create array to store reified subtree(s)
    int length = ets.length;
    Type[] exceptionTypes = new Type[length];
    // reify all subtrees
    for (int i = 0; i < length; i++) {
        Reifier r = getReifier(); // obtain visitor
        ets[i].accept(r); // reify subtree
        // extract result from visitor and store it
        exceptionTypes[i] = r.getResult();
    }
    return exceptionTypes;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:ConstructorRepository.java

示例6: TypeVariableImpl

import sun.reflect.generics.tree.FieldTypeSignature; //导入依赖的package包/类
private TypeVariableImpl(D decl, String n, FieldTypeSignature[] bs,
                         GenericsFactory f) {
    super(f);
    genericDeclaration = decl;
    name = n;
    bounds = bs;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:TypeVariableImpl.java

示例7: reifyBounds

import sun.reflect.generics.tree.FieldTypeSignature; //导入依赖的package包/类
Type[] reifyBounds(FieldTypeSignature[] boundASTs) {
    final int length = boundASTs.length;
    final Type[] bounds = new Type[length];
    // iterate over bound trees, reifying each in turn
    for (int i = 0; i < length; i++) {
        Reifier r = getReifier();
        boundASTs[i].accept(r);
        bounds[i] = r.getResult();
    }
    return bounds;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:LazyReflectiveObjectGenerator.java

示例8: WildcardTypeImpl

import sun.reflect.generics.tree.FieldTypeSignature; //导入依赖的package包/类
private WildcardTypeImpl(FieldTypeSignature[] ubs,
                         FieldTypeSignature[] lbs,
                         GenericsFactory f) {
    super(f);
    upperBounds = ubs;
    lowerBounds = lbs;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:WildcardTypeImpl.java


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