com.sun.tools.internal.xjc.model.nav.NClass Java Examples

The following examples show how to use com.sun.tools.internal.xjc.model.nav.NClass. 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
Source File: CAdapter.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
static NClass getRef( final Class<? extends XmlAdapter> adapter, boolean copy ) {
    if(copy) {
        // TODO: this is a hack. the code generation should be defered until
        // the backend. (right now constant generation happens in the front-end)
        return new EagerNClass(adapter) {
            @Override
            public JClass toType(Outline o, Aspect aspect) {
                return o.addRuntime(adapter);
            }
            public String fullName() {
                // TODO: implement this method later
                throw new UnsupportedOperationException();
            }
        };
    } else {
        return NavigatorImpl.theInstance.ref(adapter);
    }
}
 
Example #2
Source File: CAdapter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
static NClass getRef( final Class<? extends XmlAdapter> adapter, boolean copy ) {
    if(copy) {
        // TODO: this is a hack. the code generation should be defered until
        // the backend. (right now constant generation happens in the front-end)
        return new EagerNClass(adapter) {
            @Override
            public JClass toType(Outline o, Aspect aspect) {
                return o.addRuntime(adapter);
            }
            public String fullName() {
                // TODO: implement this method later
                throw new UnsupportedOperationException();
            }
        };
    } else {
        return NavigatorImpl.theInstance.ref(adapter);
    }
}
 
Example #3
Source File: CAdapter.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
static NClass getRef( final Class<? extends XmlAdapter> adapter, boolean copy ) {
    if(copy) {
        // TODO: this is a hack. the code generation should be defered until
        // the backend. (right now constant generation happens in the front-end)
        return new EagerNClass(adapter) {
            @Override
            public JClass toType(Outline o, Aspect aspect) {
                return o.addRuntime(adapter);
            }
            public String fullName() {
                // TODO: implement this method later
                throw new UnsupportedOperationException();
            }
        };
    } else {
        return NavigatorImpl.theInstance.ref(adapter);
    }
}
 
Example #4
Source File: CAdapter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
static NClass getRef( final Class<? extends XmlAdapter> adapter, boolean copy ) {
    if(copy) {
        // TODO: this is a hack. the code generation should be defered until
        // the backend. (right now constant generation happens in the front-end)
        return new EagerNClass(adapter) {
            @Override
            public JClass toType(Outline o, Aspect aspect) {
                return o.addRuntime(adapter);
            }
            public String fullName() {
                // TODO: implement this method later
                throw new UnsupportedOperationException();
            }
        };
    } else {
        return NavigatorImpl.theInstance.ref(adapter);
    }
}
 
Example #5
Source File: CAdapter.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
static NClass getRef( final Class<? extends XmlAdapter> adapter, boolean copy ) {
    if(copy) {
        // TODO: this is a hack. the code generation should be defered until
        // the backend. (right now constant generation happens in the front-end)
        return new EagerNClass(adapter) {
            @Override
            public JClass toType(Outline o, Aspect aspect) {
                return o.addRuntime(adapter);
            }
            public String fullName() {
                // TODO: implement this method later
                throw new UnsupportedOperationException();
            }
        };
    } else {
        return NavigatorImpl.theInstance.ref(adapter);
    }
}
 
Example #6
Source File: CReferencePropertyInfo.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public NClass getDOMHandler() {
    // TODO: support other DOM handlers
    if(getWildcard()!=null)
        return NavigatorImpl.create(W3CDomHandler.class);
    else
        return null;
}
 
Example #7
Source File: Model.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public CElementInfo getElementInfo(NClass scope,QName name) {
    Map<QName,CElementInfo> m = elementMappings.get(scope);
    if(m!=null) {
        CElementInfo r = m.get(name);
        if(r!=null)     return r;
    }
    return elementMappings.get(null).get(name);
}
 
Example #8
Source File: CReferencePropertyInfo.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public NClass getDOMHandler() {
    // TODO: support other DOM handlers
    if(getWildcard()!=null)
        return NavigatorImpl.create(W3CDomHandler.class);
    else
        return null;
}
 
Example #9
Source File: Model.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void add( CElementInfo ei ) {
    NClass clazz = null;
    if(ei.getScope()!=null)
        clazz = ei.getScope().getClazz();

    Map<QName,CElementInfo> m = elementMappings.get(clazz);
    if(m==null)
        elementMappings.put(clazz,m=new HashMap<QName,CElementInfo>());
    m.put(ei.getElementName(),ei);
}
 
Example #10
Source File: CReferencePropertyInfo.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public NClass getDOMHandler() {
    // TODO: support other DOM handlers
    if(getWildcard()!=null)
        return NavigatorImpl.create(W3CDomHandler.class);
    else
        return null;
}
 
Example #11
Source File: Model.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public CElementInfo getElementInfo(NClass scope,QName name) {
    Map<QName,CElementInfo> m = elementMappings.get(scope);
    if(m!=null) {
        CElementInfo r = m.get(name);
        if(r!=null)     return r;
    }
    return elementMappings.get(null).get(name);
}
 
Example #12
Source File: Model.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void add( CElementInfo ei ) {
    NClass clazz = null;
    if(ei.getScope()!=null)
        clazz = ei.getScope().getClazz();

    Map<QName,CElementInfo> m = elementMappings.get(clazz);
    if(m==null)
        elementMappings.put(clazz,m=new HashMap<QName,CElementInfo>());
    m.put(ei.getElementName(),ei);
}
 
Example #13
Source File: Model.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public CElementInfo getElementInfo(NClass scope,QName name) {
    Map<QName,CElementInfo> m = elementMappings.get(scope);
    if(m!=null) {
        CElementInfo r = m.get(name);
        if(r!=null)     return r;
    }
    return elementMappings.get(null).get(name);
}
 
Example #14
Source File: CReferencePropertyInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public NClass getDOMHandler() {
    // TODO: support other DOM handlers
    if(getWildcard()!=null)
        return NavigatorImpl.create(W3CDomHandler.class);
    else
        return null;
}
 
Example #15
Source File: Model.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
void add( CElementInfo ei ) {
    NClass clazz = null;
    if(ei.getScope()!=null)
        clazz = ei.getScope().getClazz();

    Map<QName,CElementInfo> m = elementMappings.get(clazz);
    if(m==null)
        elementMappings.put(clazz,m=new HashMap<QName,CElementInfo>());
    m.put(ei.getElementName(),ei);
}
 
Example #16
Source File: CReferencePropertyInfo.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public NClass getDOMHandler() {
    // TODO: support other DOM handlers
    if(getWildcard()!=null)
        return NavigatorImpl.create(W3CDomHandler.class);
    else
        return null;
}
 
Example #17
Source File: Model.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public CElementInfo getElementInfo(NClass scope,QName name) {
    Map<QName,CElementInfo> m = elementMappings.get(scope);
    if(m!=null) {
        CElementInfo r = m.get(name);
        if(r!=null)     return r;
    }
    return elementMappings.get(null).get(name);
}
 
Example #18
Source File: Model.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public CElementInfo getElementInfo(NClass scope,QName name) {
    Map<QName,CElementInfo> m = elementMappings.get(scope);
    if(m!=null) {
        CElementInfo r = m.get(name);
        if(r!=null)     return r;
    }
    return elementMappings.get(null).get(name);
}
 
Example #19
Source File: CClassInfo.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Element<NType,NClass> asElement() {
    if(isElement())
        return this;
    else
        return null;
}
 
Example #20
Source File: CClassInfo.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public final NClass getType() {
    return this;
}
 
Example #21
Source File: CTypeRef.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public PropertyInfo<NType, NClass> getSource() {
    // TODO: implement this method later
    throw new UnsupportedOperationException();
}
 
Example #22
Source File: CTypeRef.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public PropertyInfo<NType, NClass> getSource() {
    // TODO: implement this method later
    throw new UnsupportedOperationException();
}
 
Example #23
Source File: CBuiltinLeafInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @deprecated always return null at this level.
 */
public final Element<NType,NClass> asElement() {
    return null;
}
 
Example #24
Source File: CEnumLeafInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Element<NType,NClass> asElement() {
    return null;
}
 
Example #25
Source File: CClassInfo.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public final NClass getType() {
    return this;
}
 
Example #26
Source File: Model.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public CNonElement getTypeInfo(Ref<NType,NClass> ref) {
    // TODO: handle XmlValueList
    assert !ref.valueList;
    return getTypeInfo(ref.type);
}
 
Example #27
Source File: CClassInfo.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public NClass getClazz() {
    return this;
}
 
Example #28
Source File: Model.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Map<QName,CElementInfo> getElementMappings(NClass scope) {
    return elementMappings.get(scope);
}
 
Example #29
Source File: Model.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Map<QName,CElementInfo> getElementMappings(NClass scope) {
    return elementMappings.get(scope);
}
 
Example #30
Source File: CClassInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public NClass getClazz() {
    return this;
}