Java Code Examples for com.sun.xml.internal.bind.v2.model.core.NonElement#getTypeName()

The following examples show how to use com.sun.xml.internal.bind.v2.model.core.NonElement#getTypeName() . 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: JAXBContextImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public QName getTypeName(TypeReference tr) {
    try {
        NonElement<Type,Class> xt = getXmlType(getTypeInfoSet(),tr);
        if(xt==null)    throw new IllegalArgumentException();
        return xt.getTypeName();
    } catch (IllegalAnnotationsException e) {
        // impossible given that JAXBRIContext has been successfully built in the first place
        throw new AssertionError(e);
    }
}
 
Example 2
Source File: JAXBContextImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public QName getTypeName(TypeReference tr) {
    try {
        NonElement<Type,Class> xt = getXmlType(getTypeInfoSet(),tr);
        if(xt==null)    throw new IllegalArgumentException();
        return xt.getTypeName();
    } catch (IllegalAnnotationsException e) {
        // impossible given that JAXBRIContext has been successfully built in the first place
        throw new AssertionError(e);
    }
}
 
Example 3
Source File: ModelBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example 4
Source File: JAXBModelImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public QName getXmlTypeName(Reference javaType) {
    NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType);

    if(ti!=null)
        return ti.getTypeName();

    return null;
}
 
Example 5
Source File: JAXBModelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public QName getXmlTypeName(Reference javaType) {
    NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType);

    if(ti!=null)
        return ti.getTypeName();

    return null;
}
 
Example 6
Source File: JAXBModelImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public QName getXmlTypeName(Reference javaType) {
    NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType);

    if(ti!=null)
        return ti.getTypeName();

    return null;
}
 
Example 7
Source File: ModelBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example 8
Source File: JAXBModelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public QName getXmlTypeName(Reference javaType) {
    NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType);

    if(ti!=null)
        return ti.getTypeName();

    return null;
}
 
Example 9
Source File: ModelBuilder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example 10
Source File: JAXBContextImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public QName getTypeName(TypeReference tr) {
    try {
        NonElement<Type,Class> xt = getXmlType(getTypeInfoSet(),tr);
        if(xt==null)    throw new IllegalArgumentException();
        return xt.getTypeName();
    } catch (IllegalAnnotationsException e) {
        // impossible given that JAXBRIContext has been successfully built in the first place
        throw new AssertionError(e);
    }
}
 
Example 11
Source File: JAXBModelImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public QName getXmlTypeName(Reference javaType) {
    NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType);

    if(ti!=null)
        return ti.getTypeName();

    return null;
}
 
Example 12
Source File: JAXBContextImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public QName getTypeName(TypeReference tr) {
    try {
        NonElement<Type,Class> xt = getXmlType(getTypeInfoSet(),tr);
        if(xt==null)    throw new IllegalArgumentException();
        return xt.getTypeName();
    } catch (IllegalAnnotationsException e) {
        // impossible given that JAXBRIContext has been successfully built in the first place
        throw new AssertionError(e);
    }
}
 
Example 13
Source File: ModelBuilder.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example 14
Source File: JAXBModelImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public QName getXmlTypeName(Reference javaType) {
    NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType);

    if(ti!=null)
        return ti.getTypeName();

    return null;
}
 
Example 15
Source File: JAXBContextImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public QName getTypeName(TypeReference tr) {
    try {
        NonElement<Type,Class> xt = getXmlType(getTypeInfoSet(),tr);
        if(xt==null)    throw new IllegalArgumentException();
        return xt.getTypeName();
    } catch (IllegalAnnotationsException e) {
        // impossible given that JAXBRIContext has been successfully built in the first place
        throw new AssertionError(e);
    }
}
 
Example 16
Source File: ModelBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks the uniqueness of the type name.
 */
private void addTypeName(NonElement<T, C> r) {
    QName t = r.getTypeName();
    if(t==null)     return;

    TypeInfo old = typeNames.put(t,r);
    if(old!=null) {
        // collision
        reportError(new IllegalAnnotationException(
                Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
                old, r ));
    }
}
 
Example 17
Source File: XmlSchemaGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Writes the name attribute if it's named.
 */
private void writeName(NonElement<T,C> c, TypedXmlWriter xw) {
    QName tn = c.getTypeName();
    if(tn!=null)
        xw._attribute("name",tn.getLocalPart());  // named
}
 
Example 18
Source File: XmlSchemaGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Writes the name attribute if it's named.
 */
private void writeName(NonElement<T,C> c, TypedXmlWriter xw) {
    QName tn = c.getTypeName();
    if(tn!=null)
        xw._attribute("name",tn.getLocalPart());  // named
}
 
Example 19
Source File: XmlSchemaGenerator.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Writes the name attribute if it's named.
 */
private void writeName(NonElement<T,C> c, TypedXmlWriter xw) {
    QName tn = c.getTypeName();
    if(tn!=null)
        xw._attribute("name",tn.getLocalPart());  // named
}
 
Example 20
Source File: XmlSchemaGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Writes the name attribute if it's named.
 */
private void writeName(NonElement<T,C> c, TypedXmlWriter xw) {
    QName tn = c.getTypeName();
    if(tn!=null)
        xw._attribute("name",tn.getLocalPart());  // named
}