Java源码示例:com.sun.xml.internal.bind.v2.TODO

示例1
public Class parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        String name = WhiteSpaceProcessor.trim(text).toString();
        ClassLoader cl = UnmarshallingContext.getInstance().classLoader;
        if(cl==null)
            cl = Thread.currentThread().getContextClassLoader();

        if(cl!=null)
            return cl.loadClass(name);
        else
            return Class.forName(name);
    } catch (ClassNotFoundException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例2
public Class parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        String name = WhiteSpaceProcessor.trim(text).toString();
        ClassLoader cl = UnmarshallingContext.getInstance().classLoader;
        if(cl==null)
            cl = Thread.currentThread().getContextClassLoader();

        if(cl!=null)
            return cl.loadClass(name);
        else
            return Class.forName(name);
    } catch (ClassNotFoundException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例3
public Class parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        String name = WhiteSpaceProcessor.trim(text).toString();
        ClassLoader cl = UnmarshallingContext.getInstance().classLoader;
        if(cl==null)
            cl = Thread.currentThread().getContextClassLoader();

        if(cl!=null)
            return cl.loadClass(name);
        else
            return Class.forName(name);
    } catch (ClassNotFoundException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例4
public Class parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        String name = WhiteSpaceProcessor.trim(text).toString();
        ClassLoader cl = UnmarshallingContext.getInstance().classLoader;
        if(cl==null)
            cl = Thread.currentThread().getContextClassLoader();

        if(cl!=null)
            return cl.loadClass(name);
        else
            return Class.forName(name);
    } catch (ClassNotFoundException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例5
public Class parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        String name = WhiteSpaceProcessor.trim(text).toString();
        ClassLoader cl = UnmarshallingContext.getInstance().classLoader;
        if(cl==null)
            cl = Thread.currentThread().getContextClassLoader();

        if(cl!=null)
            return cl.loadClass(name);
        else
            return Class.forName(name);
    } catch (ClassNotFoundException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例6
public Class parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        String name = WhiteSpaceProcessor.trim(text).toString();
        ClassLoader cl = UnmarshallingContext.getInstance().classLoader;
        if(cl==null)
            cl = Thread.currentThread().getContextClassLoader();

        if(cl!=null)
            return cl.loadClass(name);
        else
            return Class.forName(name);
    } catch (ClassNotFoundException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例7
public Class parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        String name = WhiteSpaceProcessor.trim(text).toString();
        ClassLoader cl = UnmarshallingContext.getInstance().classLoader;
        if(cl==null)
            cl = Thread.currentThread().getContextClassLoader();

        if(cl!=null)
            return cl.loadClass(name);
        else
            return Class.forName(name);
    } catch (ClassNotFoundException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例8
public Class parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        String name = WhiteSpaceProcessor.trim(text).toString();
        ClassLoader cl = UnmarshallingContext.getInstance().classLoader;
        if(cl==null)
            cl = Thread.currentThread().getContextClassLoader();

        if(cl!=null)
            return cl.loadClass(name);
        else
            return Class.forName(name);
    } catch (ClassNotFoundException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例9
/**
 * Computes the type name of the array from that of the item type.
 */
public static QName calcArrayTypeName(QName n) {
    String uri;
    if(n.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA)) {
        TODO.checkSpec("this URI");
        uri = "http://jaxb.dev.java.net/array";
    } else
        uri = n.getNamespaceURI();
    return new QName(uri,n.getLocalPart()+"Array");
}
 
示例10
public URL parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        return new URL(WhiteSpaceProcessor.trim(text).toString());
    } catch (MalformedURLException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例11
public UUID parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        return UUID.fromString(WhiteSpaceProcessor.trim(text).toString());
    } catch (IllegalArgumentException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例12
private QName calcXmlName(String uri,String local) {
    // compute the default
    TODO.checkSpec();
    if(local.length()==0 || local.equals("##default"))
        local = seed.getName();
    if(uri.equals("##default")) {
        XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
        // JAX-RPC doesn't want the default namespace URI swapping to take effect to
        // local "unqualified" elements. UGLY.
        if(xs!=null) {
            switch(xs.elementFormDefault()) {
            case QUALIFIED:
                QName typeName = parent.getTypeName();
                if(typeName!=null)
                    uri = typeName.getNamespaceURI();
                else
                    uri = xs.namespace();
                if(uri.length()==0)
                    uri = parent.builder.defaultNsUri;
                break;
            case UNQUALIFIED:
            case UNSET:
                uri = "";
            }
        } else {
            uri = "";
        }
    }
    return new QName(uri.intern(),local.intern());
}
 
示例13
public void wildcard(XSWildcard xsWildcard) {
    // TODO: implement this method later
    // I guess we might allow this to be mapped to a generic element property ---
    // not sure exactly how do we do it.
    TODO.checkSpec();
    throw new UnsupportedOperationException();
}
 
示例14
public static TypeUse makeCollection( TypeUse t ) {
    if(t.isCollection())    return t;
    CAdapter au = t.getAdapterUse();
    if(au!=null && !au.isWhitespaceAdapter()) {
        // we can't process this right now.
        // for now bind to a weaker type
        TODO.checkSpec();
        return CBuiltinLeafInfo.STRING_LIST;
    }
    return new TypeUseImpl( t.getInfo(), true, t.idUse(), t.getExpectedMimeType(), null );
}
 
示例15
/**
 * Computes the type name of the array from that of the item type.
 */
public static QName calcArrayTypeName(QName n) {
    String uri;
    if(n.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA)) {
        TODO.checkSpec("this URI");
        uri = "http://jaxb.dev.java.net/array";
    } else
        uri = n.getNamespaceURI();
    return new QName(uri,n.getLocalPart()+"Array");
}
 
示例16
public URL parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        return new URL(WhiteSpaceProcessor.trim(text).toString());
    } catch (MalformedURLException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例17
public UUID parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        return UUID.fromString(WhiteSpaceProcessor.trim(text).toString());
    } catch (IllegalArgumentException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例18
private QName calcXmlName(String uri,String local) {
    // compute the default
    TODO.checkSpec();
    if(local.length()==0 || local.equals("##default"))
        local = seed.getName();
    if(uri.equals("##default")) {
        XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
        // JAX-RPC doesn't want the default namespace URI swapping to take effect to
        // local "unqualified" elements. UGLY.
        if(xs!=null) {
            switch(xs.elementFormDefault()) {
            case QUALIFIED:
                QName typeName = parent.getTypeName();
                if(typeName!=null)
                    uri = typeName.getNamespaceURI();
                else
                    uri = xs.namespace();
                if(uri.length()==0)
                    uri = parent.builder.defaultNsUri;
                break;
            case UNQUALIFIED:
            case UNSET:
                uri = "";
            }
        } else {
            uri = "";
        }
    }
    return new QName(uri.intern(),local.intern());
}
 
示例19
public void wildcard(XSWildcard xsWildcard) {
    // TODO: implement this method later
    // I guess we might allow this to be mapped to a generic element property ---
    // not sure exactly how do we do it.
    TODO.checkSpec();
    throw new UnsupportedOperationException();
}
 
示例20
public static TypeUse makeCollection( TypeUse t ) {
    if(t.isCollection())    return t;
    CAdapter au = t.getAdapterUse();
    if(au!=null && !au.isWhitespaceAdapter()) {
        // we can't process this right now.
        // for now bind to a weaker type
        TODO.checkSpec();
        return CBuiltinLeafInfo.STRING_LIST;
    }
    return new TypeUseImpl( t.getInfo(), true, t.idUse(), t.getExpectedMimeType(), null );
}
 
示例21
/**
 * Computes the type name of the array from that of the item type.
 */
public static QName calcArrayTypeName(QName n) {
    String uri;
    if(n.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA)) {
        TODO.checkSpec("this URI");
        uri = "http://jaxb.dev.java.net/array";
    } else
        uri = n.getNamespaceURI();
    return new QName(uri,n.getLocalPart()+"Array");
}
 
示例22
public URL parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        return new URL(WhiteSpaceProcessor.trim(text).toString());
    } catch (MalformedURLException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例23
public UUID parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        return UUID.fromString(WhiteSpaceProcessor.trim(text).toString());
    } catch (IllegalArgumentException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例24
private QName calcXmlName(String uri,String local) {
    // compute the default
    TODO.checkSpec();
    if(local.length()==0 || local.equals("##default"))
        local = seed.getName();
    if(uri.equals("##default")) {
        XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
        // JAX-RPC doesn't want the default namespace URI swapping to take effect to
        // local "unqualified" elements. UGLY.
        if(xs!=null) {
            switch(xs.elementFormDefault()) {
            case QUALIFIED:
                QName typeName = parent.getTypeName();
                if(typeName!=null)
                    uri = typeName.getNamespaceURI();
                else
                    uri = xs.namespace();
                if(uri.length()==0)
                    uri = parent.builder.defaultNsUri;
                break;
            case UNQUALIFIED:
            case UNSET:
                uri = "";
            }
        } else {
            uri = "";
        }
    }
    return new QName(uri.intern(),local.intern());
}
 
示例25
public void wildcard(XSWildcard xsWildcard) {
    // TODO: implement this method later
    // I guess we might allow this to be mapped to a generic element property ---
    // not sure exactly how do we do it.
    TODO.checkSpec();
    throw new UnsupportedOperationException();
}
 
示例26
public static TypeUse makeCollection( TypeUse t ) {
    if(t.isCollection())    return t;
    CAdapter au = t.getAdapterUse();
    if(au!=null && !au.isWhitespaceAdapter()) {
        // we can't process this right now.
        // for now bind to a weaker type
        TODO.checkSpec();
        return CBuiltinLeafInfo.STRING_LIST;
    }
    return new TypeUseImpl( t.getInfo(), true, t.idUse(), t.getExpectedMimeType(), null );
}
 
示例27
/**
 * Computes the type name of the array from that of the item type.
 */
public static QName calcArrayTypeName(QName n) {
    String uri;
    if(n.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA)) {
        TODO.checkSpec("this URI");
        uri = "http://jaxb.dev.java.net/array";
    } else
        uri = n.getNamespaceURI();
    return new QName(uri,n.getLocalPart()+"Array");
}
 
示例28
public URL parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        return new URL(WhiteSpaceProcessor.trim(text).toString());
    } catch (MalformedURLException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例29
public UUID parse(CharSequence text) throws SAXException {
    TODO.checkSpec("JSR222 Issue #42");
    try {
        return UUID.fromString(WhiteSpaceProcessor.trim(text).toString());
    } catch (IllegalArgumentException e) {
        UnmarshallingContext.getInstance().handleError(e);
        return null;
    }
}
 
示例30
private QName calcXmlName(String uri,String local) {
    // compute the default
    TODO.checkSpec();
    if(local.length()==0 || local.equals("##default"))
        local = seed.getName();
    if(uri.equals("##default")) {
        XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
        // JAX-RPC doesn't want the default namespace URI swapping to take effect to
        // local "unqualified" elements. UGLY.
        if(xs!=null) {
            switch(xs.elementFormDefault()) {
            case QUALIFIED:
                QName typeName = parent.getTypeName();
                if(typeName!=null)
                    uri = typeName.getNamespaceURI();
                else
                    uri = xs.namespace();
                if(uri.length()==0)
                    uri = parent.builder.defaultNsUri;
                break;
            case UNQUALIFIED:
            case UNSET:
                uri = "";
            }
        } else {
            uri = "";
        }
    }
    return new QName(uri.intern(),local.intern());
}