com.sun.xml.internal.bind.v2.model.core.Element Java Examples

The following examples show how to use com.sun.xml.internal.bind.v2.model.core.Element. 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: XmlSchemaGenerator.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an <import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #2
Source File: XmlSchemaGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #3
Source File: XmlSchemaGenerator.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #4
Source File: XmlSchemaGenerator.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #5
Source File: XmlSchemaGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an {@code <import>}
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #6
Source File: XmlSchemaGenerator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #7
Source File: XmlSchemaGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #8
Source File: XmlSchemaGenerator.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Process the given PropertyInfo looking for references to namespaces that
 * are foreign to the given namespace.  Any foreign namespace references
 * found are added to the given namespaces dependency list and an &lt;import>
 * is generated for it.
 *
 * @param p the PropertyInfo
 */
private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
    for (TypeInfo<T, C> t : p.ref()) {
        if ((t instanceof ClassInfo) && (processingDepth > 0)) {
            java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
            for (PropertyInfo subp : l) {
                processForeignNamespaces(subp, --processingDepth);
            }
        }
        if (t instanceof Element) {
            addDependencyTo(((Element) t).getElementName());
        }
        if (t instanceof NonElement) {
            addDependencyTo(((NonElement) t).getTypeName());
        }
    }
}
 
Example #9
Source File: ClassInfoImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * The substitution hierarchy is the same as the inheritance hierarchy.
 */
public final Element<T,C> getSubstitutionHead() {
    ClassInfoImpl<T,C,F,M> c = getBaseClass();
    while(c!=null && !c.isElement())
        c = c.getBaseClass();
    return c;
}
 
Example #10
Source File: ClassInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * The substitution hierarchy is the same as the inheritance hierarchy.
 */
public final Element<T,C> getSubstitutionHead() {
    ClassInfoImpl<T,C,F,M> c = getBaseClass();
    while(c!=null && !c.isElement())
        c = c.getBaseClass();
    return c;
}
 
Example #11
Source File: ClassInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * The substitution hierarchy is the same as the inheritance hierarchy.
 */
public final Element<T,C> getSubstitutionHead() {
    ClassInfoImpl<T,C,F,M> c = getBaseClass();
    while(c!=null && !c.isElement())
        c = c.getBaseClass();
    return c;
}
 
Example #12
Source File: ClassInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * The substitution hierarchy is the same as the inheritance hierarchy.
 */
public final Element<T,C> getSubstitutionHead() {
    ClassInfoImpl<T,C,F,M> c = getBaseClass();
    while(c!=null && !c.isElement())
        c = c.getBaseClass();
    return c;
}
 
Example #13
Source File: ClassInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * The substitution hierarchy is the same as the inheritance hierarchy.
 */
public final Element<T,C> getSubstitutionHead() {
    ClassInfoImpl<T,C,F,M> c = getBaseClass();
    while(c!=null && !c.isElement())
        c = c.getBaseClass();
    return c;
}
 
Example #14
Source File: ClassInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * The substitution hierarchy is the same as the inheritance hierarchy.
 */
public final Element<T,C> getSubstitutionHead() {
    ClassInfoImpl<T,C,F,M> c = getBaseClass();
    while(c!=null && !c.isElement())
        c = c.getBaseClass();
    return c;
}
 
Example #15
Source File: ClassInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * The substitution hierarchy is the same as the inheritance hierarchy.
 */
public final Element<T,C> getSubstitutionHead() {
    ClassInfoImpl<T,C,F,M> c = getBaseClass();
    while(c!=null && !c.isElement())
        c = c.getBaseClass();
    return c;
}
 
Example #16
Source File: ClassInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * The substitution hierarchy is the same as the inheritance hierarchy.
 */
public final Element<T,C> getSubstitutionHead() {
    ClassInfoImpl<T,C,F,M> c = getBaseClass();
    while(c!=null && !c.isElement())
        c = c.getBaseClass();
    return c;
}
 
Example #17
Source File: ReferencePropertyInfoImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Set<? extends Element<T,C>> ref() {
    return getElements();
}
 
Example #18
Source File: BuiltinLeafInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @deprecated always return null at this level.
 */
public final Element<TypeT,ClassDeclT> asElement() {
    return null;
}
 
Example #19
Source File: CBuiltinLeafInfo.java    From openjdk-8-source 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 #20
Source File: CBuiltinLeafInfo.java    From openjdk-8 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 #21
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 #22
Source File: CEnumLeafInfo.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Element<NType,NClass> asElement() {
    return null;
}
 
Example #23
Source File: ClassInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Element<T,C> asElement() {
    if(isElement())
        return this;
    else
        return null;
}
 
Example #24
Source File: BuiltinLeafInfoImpl.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<TypeT,ClassDeclT> asElement() {
    return null;
}
 
Example #25
Source File: EnumLeafInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Element<T,C> asElement() {
    if(isElement())
        return this;
    else
        return null;
}
 
Example #26
Source File: ReferencePropertyInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Set<? extends Element<T,C>> getElements() {
    if(types==null)
        calcTypes(false);
    assert types!=null;
    return types;
}
 
Example #27
Source File: CEnumLeafInfo.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Element<NType,NClass> asElement() {
    return null;
}
 
Example #28
Source File: CClassInfo.java    From openjdk-jdk9 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 #29
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 #30
Source File: ClassInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Element<T,C> asElement() {
    if(isElement())
        return this;
    else
        return null;
}