Java Code Examples for sun.reflect.generics.tree.TypeSignature

The following examples show how to use sun.reflect.generics.tree.TypeSignature. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 2
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 3
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 4
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 5
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 6
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 7
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 8
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 9
Source Project: hottub   Source File: ConstructorRepository.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 10
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 11
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 12
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 13
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 14
public Type[] getParameterTypes(){
    if (paramTypes == null) { // lazily initialize parameter types
        // first, extract parameter type subtree(s) from AST
        TypeSignature[] pts = getTree().getParameterTypes();
        // create array to store reified subtree(s)
        Type[] ps = new Type[pts.length];
        // reify all subtrees
        for (int i = 0; i < pts.length; i++) {
            Reifier r = getReifier(); // obtain visitor
            pts[i].accept(r); // reify subtree
            // extract result from visitor and store it
            ps[i] = r.getResult();
        }
        paramTypes = ps; // cache overall result
    }
    return paramTypes.clone(); // return cached result
}
 
Example 15
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 16
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 17
Source Project: jdk8u60   Source File: AnnotationParser.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 18
Source Project: java-n-IDE-for-Android   Source File: AnnotationParser.java    License: Apache License 2.0 5 votes vote down vote up
private static Class<?> parseSig(String sig, Class container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 19
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 20
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 21
Source Project: javaide   Source File: AnnotationParser.java    License: GNU General Public License v3.0 5 votes vote down vote up
private static Class<?> parseSig(String sig, Class container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 22
Source Project: Bytecoder   Source File: AnnotationParser.java    License: Apache License 2.0 5 votes vote down vote up
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 23
Source Project: Bytecoder   Source File: ConstructorRepository.java    License: Apache License 2.0 5 votes vote down vote up
private Type[] computeParameterTypes() {
    // first, extract parameter type subtree(s) from AST
    TypeSignature[] pts = getTree().getParameterTypes();
    // create array to store reified subtree(s)
    int length = pts.length;
    Type[] parameterTypes = new Type[length];
    // reify all subtrees
    for (int i = 0; i < length; i++) {
        Reifier r = getReifier(); // obtain visitor
        pts[i].accept(r); // reify subtree
        // extract result from visitor and store it
        parameterTypes[i] = r.getResult();
    }
    return parameterTypes;
}
 
Example 24
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 25
private Type[] computeParameterTypes() {
    // first, extract parameter type subtree(s) from AST
    TypeSignature[] pts = getTree().getParameterTypes();
    // create array to store reified subtree(s)
    int length = pts.length;
    Type[] parameterTypes = new Type[length];
    // reify all subtrees
    for (int i = 0; i < length; i++) {
        Reifier r = getReifier(); // obtain visitor
        pts[i].accept(r); // reify subtree
        // extract result from visitor and store it
        parameterTypes[i] = r.getResult();
    }
    return parameterTypes;
}
 
Example 26
Source Project: jdk8u-jdk   Source File: AnnotationParser.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 27
Source Project: hottub   Source File: AnnotationParser.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 28
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 29
Source Project: openjdk-8   Source File: AnnotationParser.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}
 
Example 30
Source Project: jdk8u_jdk   Source File: AnnotationParser.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> parseSig(String sig, Class<?> container) {
    if (sig.equals("V")) return void.class;
    SignatureParser parser = SignatureParser.make();
    TypeSignature typeSig = parser.parseTypeSig(sig);
    GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
    Reifier reify = Reifier.make(factory);
    typeSig.accept(reify);
    Type result = reify.getResult();
    return toClass(result);
}