FileDocCategorySizeDatePackage
TypeInfoImpl.javaAPI DocJava SE 5 API4795Fri Aug 26 14:55:56 BST 2005com.sun.org.apache.xerces.internal.util

TypeInfoImpl

public class TypeInfoImpl extends Object implements TypeInfo
Straight-forward implementation of {@link TypeInfo}.

This class is immutable.

author
Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)

Fields Summary
private final String
typeNamespace
private final String
typeName
private static final String
dtdNamespaceURI
private static final Hashtable
dtdCache
Map from DTD type name ({@link String}) to {@link TypeInfo}.
Constructors Summary
public TypeInfoImpl()

	
	 
		typeNamespace = null;
		typeName = null;
	
public TypeInfoImpl(String typeNamespace, String typeName)

        this.typeNamespace = typeNamespace;
        this.typeName = typeName;
    
public TypeInfoImpl(XSTypeDefinition t)

        this( t.getNamespace(), t.getName() );
    
Methods Summary
public static org.w3c.dom.TypeInfogetDTDTypeInfo(java.lang.String name)
Obtains a {@link TypeInfo} object from the DTD type name.

Since DTD has a very limited type names, we can actually cache the {@link TypeInfo} objects.

    
                                    
           
        TypeInfo t = (TypeInfo)dtdCache.get(name);
        if(t==null) throw new IllegalArgumentException("Unknown DTD datatype "+name);
        return t;
    
public java.lang.StringgetTypeName()

        return typeName;
    
public java.lang.StringgetTypeNamespace()

        return typeNamespace;
    
public booleanisDerivedFrom(java.lang.String typeNamespaceArg, java.lang.String typeNameArg, int derivationMethod)
Always returns false.

        return false;