Code example for Constructor

Methods: getDeclaringClass

0
                } 
                return cl.getEnclosingClass();
            } else if (decl instanceof Method) {
                return ((Method)decl).getDeclaringClass();
            } else if (decl instanceof Constructor) {
                return ((Constructor)decl).getDeclaringClass();
            } 
            throw new RuntimeException("unknown GenericDeclaration2: "
                    + decl.toString());
    } 
 
    void resolve() { 
        if (formalVar == null) {
            GenericDeclaration curLayer = declOfVarUser;
            TypeVariable var = null;
            do { 
                var = findFormalVar(curLayer, name);
                if (var != null) break;
                else { 
                    curLayer = nextLayer(curLayer);
                    if (curLayer == null) break; // FIXME: SHOULD NEVER HAPPEN!