FileDocCategorySizeDatePackage
ImplForType.javaAPI DocAndroid 1.5 API2737Wed May 06 22:41:04 BST 2009org.apache.harmony.luni.lang.reflect

ImplForType

public final class ImplForType extends Object implements ParameterizedType

Fields Summary
private final ListOfTypes
args
private final ImplForType
ownerType0
private Type
ownerTypeRes
private Class
rawType
private final String
rawTypeName
private ClassLoader
loader
Constructors Summary
public ImplForType(ImplForType ownerType, String rawTypeName, ListOfTypes args, ClassLoader loader)

        this.ownerType0 = ownerType;
        this.rawTypeName = rawTypeName;
        this.args = args;
        this.loader = loader;
    
Methods Summary
public java.lang.reflect.Type[]getActualTypeArguments()

        // ASSUMPTION: args is never null!!!
        return args.getResolvedTypes().clone();
    
public java.lang.reflect.TypegetOwnerType()

        if (ownerTypeRes == null) {
            if (ownerType0 != null) {
                ownerTypeRes = ownerType0.getResolvedType();
            } else {
                ownerTypeRes = getRawType().getDeclaringClass();
            }
        }
        return ownerTypeRes;
    
public java.lang.ClassgetRawType()

        if (rawType == null) {
            // Here the actual loading of the class has to be performed and the 
            // Exceptions have to be re-thrown TypeNotPresent...
            // How to deal with member (nested) classes?
            try {
                rawType = Class.forName(rawTypeName, false, loader);
            } catch (ClassNotFoundException e) {
                throw new TypeNotPresentException(rawTypeName, e);
            }
        }
        return rawType;
    
java.lang.reflect.TypegetResolvedType()

        if (args.getResolvedTypes().length == 0) {
            return getRawType();
        } else {
            return this;
        }
    
public java.lang.StringtoString()

        StringBuilder sb = new StringBuilder();
        sb.append(rawTypeName);
        if (args.length() > 0) {
            sb.append("<").append(args).append(">");
        }
        return sb.toString();