com.sun.tools.internal.ws.processor.model.java.JavaStructureMember Java Examples

The following examples show how to use com.sun.tools.internal.ws.processor.model.java.JavaStructureMember. 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: ModelerUtils.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #2
Source File: ModelerUtils.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #3
Source File: ModelerUtils.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two JAXBStructures.
 *
 * @param struct1
 * @param struct2
 * @return true if struct1 and struct2 are equivalent.
 */
public static boolean isEquivalentLiteralStructures(
    JAXBStructuredType struct1,
    JAXBStructuredType struct2) {
    if (struct1.getElementMembersCount() != struct2.getElementMembersCount())
        return false;
    Iterator members = struct1.getElementMembers();
    JAXBElementMember member1;
    JavaStructureMember javaMember1, javaMember2;
    for (int i = 0; members.hasNext(); i++) {
        member1 = (JAXBElementMember)members.next();
        javaMember1 = member1.getJavaStructureMember();
        javaMember2 =
            ((JavaStructureType)struct2.getJavaType()).getMemberByName(
                member1.getJavaStructureMember().getName());
        if (javaMember2.getConstructorPos() != i
            || !javaMember1.getType().equals(javaMember2.getType())) {
            return false;
        }
    }
    return false;
}
 
Example #4
Source File: ModelerUtils.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two JAXBStructures.
 *
 * @param struct1
 * @param struct2
 * @return true if struct1 and struct2 are equivalent.
 */
public static boolean isEquivalentLiteralStructures(
    JAXBStructuredType struct1,
    JAXBStructuredType struct2) {
    if (struct1.getElementMembersCount() != struct2.getElementMembersCount())
        return false;
    Iterator members = struct1.getElementMembers();
    JAXBElementMember member1;
    JavaStructureMember javaMember1, javaMember2;
    for (int i = 0; members.hasNext(); i++) {
        member1 = (JAXBElementMember)members.next();
        javaMember1 = member1.getJavaStructureMember();
        javaMember2 =
            ((JavaStructureType)struct2.getJavaType()).getMemberByName(
                member1.getJavaStructureMember().getName());
        if (javaMember2.getConstructorPos() != i
            || !javaMember1.getType().equals(javaMember2.getType())) {
            return false;
        }
    }
    return false;
}
 
Example #5
Source File: ModelerUtils.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #6
Source File: ModelerUtils.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #7
Source File: ModelerUtils.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two JAXBStructures.
 *
 * @param struct1
 * @param struct2
 * @return true if struct1 and struct2 are equivalent.
 */
public static boolean isEquivalentLiteralStructures(
    JAXBStructuredType struct1,
    JAXBStructuredType struct2) {
    if (struct1.getElementMembersCount() != struct2.getElementMembersCount())
        return false;
    Iterator members = struct1.getElementMembers();
    JAXBElementMember member1;
    JavaStructureMember javaMember1, javaMember2;
    for (int i = 0; members.hasNext(); i++) {
        member1 = (JAXBElementMember)members.next();
        javaMember1 = member1.getJavaStructureMember();
        javaMember2 =
            ((JavaStructureType)struct2.getJavaType()).getMemberByName(
                member1.getJavaStructureMember().getName());
        if (javaMember2.getConstructorPos() != i
            || !javaMember1.getType().equals(javaMember2.getType())) {
            return false;
        }
    }
    return false;
}
 
Example #8
Source File: ModelerUtils.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #9
Source File: ModelerUtils.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two JAXBStructures.
 *
 * @param struct1
 * @param struct2
 * @return true if struct1 and struct2 are equivalent.
 */
public static boolean isEquivalentLiteralStructures(
    JAXBStructuredType struct1,
    JAXBStructuredType struct2) {
    if (struct1.getElementMembersCount() != struct2.getElementMembersCount())
        return false;
    Iterator members = struct1.getElementMembers();
    JAXBElementMember member1;
    JavaStructureMember javaMember1, javaMember2;
    for (int i = 0; members.hasNext(); i++) {
        member1 = (JAXBElementMember)members.next();
        javaMember1 = member1.getJavaStructureMember();
        javaMember2 =
            ((JavaStructureType)struct2.getJavaType()).getMemberByName(
                member1.getJavaStructureMember().getName());
        if (javaMember2.getConstructorPos() != i
            || !javaMember1.getType().equals(javaMember2.getType())) {
            return false;
        }
    }
    return false;
}
 
Example #10
Source File: ModelerUtils.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two JAXBStructures.
 *
 * @param struct1
 * @param struct2
 * @return true if struct1 and struct2 are equivalent.
 */
public static boolean isEquivalentLiteralStructures(
    JAXBStructuredType struct1,
    JAXBStructuredType struct2) {
    if (struct1.getElementMembersCount() != struct2.getElementMembersCount())
        return false;
    Iterator members = struct1.getElementMembers();
    JAXBElementMember member1;
    JavaStructureMember javaMember1, javaMember2;
    for (int i = 0; members.hasNext(); i++) {
        member1 = (JAXBElementMember)members.next();
        javaMember1 = member1.getJavaStructureMember();
        javaMember2 =
            ((JavaStructureType)struct2.getJavaType()).getMemberByName(
                member1.getJavaStructureMember().getName());
        if (javaMember2.getConstructorPos() != i
            || !javaMember1.getType().equals(javaMember2.getType())) {
            return false;
        }
    }
    return false;
}
 
Example #11
Source File: ModelerUtils.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #12
Source File: ModelerUtils.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two JAXBStructures.
 *
 * @param struct1
 * @param struct2
 * @return true if struct1 and struct2 are equivalent.
 */
public static boolean isEquivalentLiteralStructures(
    JAXBStructuredType struct1,
    JAXBStructuredType struct2) {
    if (struct1.getElementMembersCount() != struct2.getElementMembersCount())
        return false;
    Iterator members = struct1.getElementMembers();
    JAXBElementMember member1;
    JavaStructureMember javaMember1, javaMember2;
    for (int i = 0; members.hasNext(); i++) {
        member1 = (JAXBElementMember)members.next();
        javaMember1 = member1.getJavaStructureMember();
        javaMember2 =
            ((JavaStructureType)struct2.getJavaType()).getMemberByName(
                member1.getJavaStructureMember().getName());
        if (javaMember2.getConstructorPos() != i
            || !javaMember1.getType().equals(javaMember2.getType())) {
            return false;
        }
    }
    return false;
}
 
Example #13
Source File: ModelerUtils.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two JAXBStructures.
 *
 * @param struct1
 * @param struct2
 * @return true if struct1 and struct2 are equivalent.
 */
public static boolean isEquivalentLiteralStructures(
    JAXBStructuredType struct1,
    JAXBStructuredType struct2) {
    if (struct1.getElementMembersCount() != struct2.getElementMembersCount())
        return false;
    Iterator members = struct1.getElementMembers();
    JAXBElementMember member1;
    JavaStructureMember javaMember1, javaMember2;
    for (int i = 0; members.hasNext(); i++) {
        member1 = (JAXBElementMember)members.next();
        javaMember1 = member1.getJavaStructureMember();
        javaMember2 =
            ((JavaStructureType)struct2.getJavaType()).getMemberByName(
                member1.getJavaStructureMember().getName());
        if (javaMember2.getConstructorPos() != i
            || !javaMember1.getType().equals(javaMember2.getType())) {
            return false;
        }
    }
    return false;
}
 
Example #14
Source File: ModelerUtils.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #15
Source File: ModelerUtils.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #16
Source File: ModelerUtils.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Compares two JAXBStructures.
 *
 * @param struct1
 * @param struct2
 * @return true if struct1 and struct2 are equivalent.
 */
public static boolean isEquivalentLiteralStructures(
    JAXBStructuredType struct1,
    JAXBStructuredType struct2) {
    if (struct1.getElementMembersCount() != struct2.getElementMembersCount())
        return false;
    Iterator members = struct1.getElementMembers();
    JAXBElementMember member1;
    JavaStructureMember javaMember1, javaMember2;
    for (int i = 0; members.hasNext(); i++) {
        member1 = (JAXBElementMember)members.next();
        javaMember1 = member1.getJavaStructureMember();
        javaMember2 =
            ((JavaStructureType)struct2.getJavaType()).getMemberByName(
                member1.getJavaStructureMember().getName());
        if (javaMember2.getConstructorPos() != i
            || !javaMember1.getType().equals(javaMember2.getType())) {
            return false;
        }
    }
    return false;
}
 
Example #17
Source File: Names.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static String getJavaMemberReadMethod(JavaStructureMember member) {
    String return_value;
    if (member.getType().getRealName().equals(ModelerConstants.BOOLEAN_CLASSNAME.getValue())) {
        return_value = GeneratorConstants.IS.getValue() + StringUtils.capitalize(member.getName());
    } else {
        return_value = GeneratorConstants.GET.getValue() + StringUtils.capitalize(member.getName());
    }
    return (return_value);
}
 
Example #18
Source File: Names.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static String getJavaMemberReadMethod(JavaStructureMember member) {
    String return_value;
    if (member.getType().getRealName().equals(ModelerConstants.BOOLEAN_CLASSNAME.getValue())) {
        return_value = GeneratorConstants.IS.getValue() + StringUtils.capitalize(member.getName());
    } else {
        return_value = GeneratorConstants.GET.getValue() + StringUtils.capitalize(member.getName());
    }
    return (return_value);
}
 
Example #19
Source File: Names.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static String getJavaMemberReadMethod(JavaStructureMember member) {
    String return_value;
    if (member.getType().getRealName().equals(ModelerConstants.BOOLEAN_CLASSNAME.getValue())) {
        return_value = GeneratorConstants.IS.getValue() + StringUtils.capitalize(member.getName());
    } else {
        return_value = GeneratorConstants.GET.getValue() + StringUtils.capitalize(member.getName());
    }
    return (return_value);
}
 
Example #20
Source File: Names.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static String getJavaMemberReadMethod(JavaStructureMember member) {
    String return_value;
    if (member.getType().getRealName().equals(ModelerConstants.BOOLEAN_CLASSNAME.getValue())) {
        return_value = GeneratorConstants.IS.getValue() + StringUtils.capitalize(member.getName());
    } else {
        return_value = GeneratorConstants.GET.getValue() + StringUtils.capitalize(member.getName());
    }
    return (return_value);
}
 
Example #21
Source File: Names.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static String getJavaMemberReadMethod(JavaStructureMember member) {
    String return_value;
    if (member.getType().getRealName().equals(ModelerConstants.BOOLEAN_CLASSNAME.getValue())) {
        return_value = GeneratorConstants.IS.getValue() + StringUtils.capitalize(member.getName());
    } else {
        return_value = GeneratorConstants.GET.getValue() + StringUtils.capitalize(member.getName());
    }
    return (return_value);
}
 
Example #22
Source File: Names.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static String getJavaMemberReadMethod(JavaStructureMember member) {
    String return_value;
    if (member.getType().getRealName().equals(ModelerConstants.BOOLEAN_CLASSNAME.getValue())) {
        return_value = GeneratorConstants.IS.getValue() + StringUtils.capitalize(member.getName());
    } else {
        return_value = GeneratorConstants.GET.getValue() + StringUtils.capitalize(member.getName());
    }
    return (return_value);
}
 
Example #23
Source File: Names.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static String getJavaMemberReadMethod(JavaStructureMember member) {
    String return_value;
    if (member.getType().getRealName().equals(ModelerConstants.BOOLEAN_CLASSNAME.getValue())) {
        return_value = GeneratorConstants.IS.getValue() + StringUtils.capitalize(member.getName());
    } else {
        return_value = GeneratorConstants.GET.getValue() + StringUtils.capitalize(member.getName());
    }
    return (return_value);
}
 
Example #24
Source File: Names.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static String getJavaMemberReadMethod(JavaStructureMember member) {
    String return_value;
    if (member.getType().getRealName().equals(ModelerConstants.BOOLEAN_CLASSNAME.getValue())) {
        return_value = GeneratorConstants.IS.getValue() + StringUtils.capitalize(member.getName());
    } else {
        return_value = GeneratorConstants.GET.getValue() + StringUtils.capitalize(member.getName());
    }
    return (return_value);
}
 
Example #25
Source File: JAXBElementMember.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public JAXBElementMember(QName name, JAXBType type,
        JavaStructureMember javaStructureMember) {
    _name = name;
    _type = type;
    _javaStructureMember = javaStructureMember;
}
 
Example #26
Source File: JAXBElementMember.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void setJavaStructureMember(JavaStructureMember javaStructureMember) {
    _javaStructureMember = javaStructureMember;
}
 
Example #27
Source File: JAXBElementMember.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public JavaStructureMember getJavaStructureMember() {
    return _javaStructureMember;
}
 
Example #28
Source File: JAXBElementMember.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void setJavaStructureMember(JavaStructureMember javaStructureMember) {
    _javaStructureMember = javaStructureMember;
}
 
Example #29
Source File: JAXBElementMember.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public JavaStructureMember getJavaStructureMember() {
    return _javaStructureMember;
}
 
Example #30
Source File: JAXBElementMember.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public JAXBElementMember(QName name, JAXBType type,
        JavaStructureMember javaStructureMember) {
    _name = name;
    _type = type;
    _javaStructureMember = javaStructureMember;
}