Java 类com.sun.codemodel.internal.JAnnotationArrayMember 实例源码

项目:OpenJSharp    文件:WebServiceWrapperGenerator.java   
private void writeXmlTypeDeclaration(JDefinedClass cls, String typeName, String namespaceUri,
                                     Collection<MemberInfo> members) {
    if (cls == null)
        return;
    JAnnotationUse xmlTypeAnn = cls.annotate(cm.ref(XmlType.class));
    xmlTypeAnn.param("name", typeName);
    xmlTypeAnn.param("namespace", namespaceUri);
    if (members.size() > 1) {
        JAnnotationArrayMember paramArray = xmlTypeAnn.paramArray("propOrder");
        for (MemberInfo memInfo : members) {
            paramArray.param(memInfo.getParamName());
        }
    }
}
项目:openjdk-jdk10    文件:WebServiceWrapperGenerator.java   
private void writeXmlTypeDeclaration(JDefinedClass cls, String typeName, String namespaceUri,
                                     Collection<MemberInfo> members) {
    if (cls == null)
        return;
    JAnnotationUse xmlTypeAnn = cls.annotate(cm.ref(XmlType.class));
    xmlTypeAnn.param("name", typeName);
    xmlTypeAnn.param("namespace", namespaceUri);
    if (members.size() > 1) {
        JAnnotationArrayMember paramArray = xmlTypeAnn.paramArray("propOrder");
        for (MemberInfo memInfo : members) {
            paramArray.param(memInfo.getParamName());
        }
    }
}
项目:openjdk9    文件:WebServiceWrapperGenerator.java   
private void writeXmlTypeDeclaration(JDefinedClass cls, String typeName, String namespaceUri,
                                     Collection<MemberInfo> members) {
    if (cls == null)
        return;
    JAnnotationUse xmlTypeAnn = cls.annotate(cm.ref(XmlType.class));
    xmlTypeAnn.param("name", typeName);
    xmlTypeAnn.param("namespace", namespaceUri);
    if (members.size() > 1) {
        JAnnotationArrayMember paramArray = xmlTypeAnn.paramArray("propOrder");
        for (MemberInfo memInfo : members) {
            paramArray.param(memInfo.getParamName());
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:WebServiceWrapperGenerator.java   
private void writeXmlTypeDeclaration(JDefinedClass cls, String typeName, String namespaceUri,
                                     Collection<MemberInfo> members) {
    if (cls == null)
        return;
    JAnnotationUse xmlTypeAnn = cls.annotate(cm.ref(XmlType.class));
    xmlTypeAnn.param("name", typeName);
    xmlTypeAnn.param("namespace", namespaceUri);
    if (members.size() > 1) {
        JAnnotationArrayMember paramArray = xmlTypeAnn.paramArray("propOrder");
        for (MemberInfo memInfo : members) {
            paramArray.param(memInfo.getParamName());
        }
    }
}
项目:infobip-open-jdk-8    文件:WebServiceWrapperGenerator.java   
private void writeXmlTypeDeclaration(JDefinedClass cls, String typeName, String namespaceUri,
                                     Collection<MemberInfo> members) {
    if (cls == null)
        return;
    JAnnotationUse xmlTypeAnn = cls.annotate(cm.ref(XmlType.class));
    xmlTypeAnn.param("name", typeName);
    xmlTypeAnn.param("namespace", namespaceUri);
    if (members.size() > 1) {
        JAnnotationArrayMember paramArray = xmlTypeAnn.paramArray("propOrder");
        for (MemberInfo memInfo : members) {
            paramArray.param(memInfo.getParamName());
        }
    }
}
项目:OLD-OpenJDK8    文件:WebServiceWrapperGenerator.java   
private void writeXmlTypeDeclaration(JDefinedClass cls, String typeName, String namespaceUri,
                                     Collection<MemberInfo> members) {
    if (cls == null)
        return;
    JAnnotationUse xmlTypeAnn = cls.annotate(cm.ref(XmlType.class));
    xmlTypeAnn.param("name", typeName);
    xmlTypeAnn.param("namespace", namespaceUri);
    if (members.size() > 1) {
        JAnnotationArrayMember paramArray = xmlTypeAnn.paramArray("propOrder");
        for (MemberInfo memInfo : members) {
            paramArray.param(memInfo.getParamName());
        }
    }
}
项目:OpenJSharp    文件:W3CAddressingJavaGeneratorExtension.java   
@Override
public void writeMethodAnnotations(TWSDLOperation two, JMethod jMethod) {
    JAnnotationUse actionAnn = null;

    if (!(two instanceof Operation))
        return;

    Operation o = ((Operation)two);

    // explicit input action
    if (o.getInput().getAction() != null && !o.getInput().getAction().equals("")) {
        // explicitly specified
        actionAnn = jMethod.annotate(Action.class);
        actionAnn.param("input", o.getInput().getAction());
    }

    // explicit output action
    if (o.getOutput() != null && o.getOutput().getAction() != null && !o.getOutput().getAction().equals("")) {
        // explicitly specified
        if (actionAnn == null)
            actionAnn = jMethod.annotate(Action.class);

        actionAnn.param("output", o.getOutput().getAction());
    }

    // explicit fault action
    if (o.getFaults() != null && o.getFaults().size() > 0) {
        Map<String, JClass> map = o.getFaults();
        JAnnotationArrayMember jam = null;

        for (Fault f : o.faults()) {
            if (f.getAction() == null)
                continue;

            if (f.getAction().equals(""))
                continue;

            if (actionAnn == null) {
                actionAnn = jMethod.annotate(Action.class);
            }
            if (jam == null) {
                jam = actionAnn.paramArray("fault");
            }
            final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
            faAnn.param("className", map.get(f.getName()));
            faAnn.param("value", f.getAction());
        }
    }
}
项目:openjdk-jdk10    文件:W3CAddressingJavaGeneratorExtension.java   
@Override
public void writeMethodAnnotations(TWSDLOperation two, JMethod jMethod) {
    JAnnotationUse actionAnn = null;

    if (!(two instanceof Operation))
        return;

    Operation o = ((Operation)two);

    // explicit input action
    if (o.getInput().getAction() != null && !o.getInput().getAction().equals("")) {
        // explicitly specified
        actionAnn = jMethod.annotate(Action.class);
        actionAnn.param("input", o.getInput().getAction());
    }

    // explicit output action
    if (o.getOutput() != null && o.getOutput().getAction() != null && !o.getOutput().getAction().equals("")) {
        // explicitly specified
        if (actionAnn == null)
            actionAnn = jMethod.annotate(Action.class);

        actionAnn.param("output", o.getOutput().getAction());
    }

    // explicit fault action
    if (o.getFaults() != null && o.getFaults().size() > 0) {
        Map<String, JClass> map = o.getFaults();
        JAnnotationArrayMember jam = null;

        for (Fault f : o.faults()) {
            if (f.getAction() == null)
                continue;

            if (f.getAction().equals(""))
                continue;

            if (actionAnn == null) {
                actionAnn = jMethod.annotate(Action.class);
            }
            if (jam == null) {
                jam = actionAnn.paramArray("fault");
            }
            final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
            faAnn.param("className", map.get(f.getName()));
            faAnn.param("value", f.getAction());
        }
    }
}
项目:openjdk9    文件:W3CAddressingJavaGeneratorExtension.java   
@Override
public void writeMethodAnnotations(TWSDLOperation two, JMethod jMethod) {
    JAnnotationUse actionAnn = null;

    if (!(two instanceof Operation))
        return;

    Operation o = ((Operation)two);

    // explicit input action
    if (o.getInput().getAction() != null && !o.getInput().getAction().equals("")) {
        // explicitly specified
        actionAnn = jMethod.annotate(Action.class);
        actionAnn.param("input", o.getInput().getAction());
    }

    // explicit output action
    if (o.getOutput() != null && o.getOutput().getAction() != null && !o.getOutput().getAction().equals("")) {
        // explicitly specified
        if (actionAnn == null)
            actionAnn = jMethod.annotate(Action.class);

        actionAnn.param("output", o.getOutput().getAction());
    }

    // explicit fault action
    if (o.getFaults() != null && o.getFaults().size() > 0) {
        Map<String, JClass> map = o.getFaults();
        JAnnotationArrayMember jam = null;

        for (Fault f : o.faults()) {
            if (f.getAction() == null)
                continue;

            if (f.getAction().equals(""))
                continue;

            if (actionAnn == null) {
                actionAnn = jMethod.annotate(Action.class);
            }
            if (jam == null) {
                jam = actionAnn.paramArray("fault");
            }
            final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
            faAnn.param("className", map.get(f.getName()));
            faAnn.param("value", f.getAction());
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:W3CAddressingJavaGeneratorExtension.java   
@Override
public void writeMethodAnnotations(TWSDLOperation two, JMethod jMethod) {
    JAnnotationUse actionAnn = null;

    if (!(two instanceof Operation))
        return;

    Operation o = ((Operation)two);

    // explicit input action
    if (o.getInput().getAction() != null && !o.getInput().getAction().equals("")) {
        // explicitly specified
        actionAnn = jMethod.annotate(Action.class);
        actionAnn.param("input", o.getInput().getAction());
    }

    // explicit output action
    if (o.getOutput() != null && o.getOutput().getAction() != null && !o.getOutput().getAction().equals("")) {
        // explicitly specified
        if (actionAnn == null)
            actionAnn = jMethod.annotate(Action.class);

        actionAnn.param("output", o.getOutput().getAction());
    }

    // explicit fault action
    if (o.getFaults() != null && o.getFaults().size() > 0) {
        Map<String, JClass> map = o.getFaults();
        JAnnotationArrayMember jam = null;

        for (Fault f : o.faults()) {
            if (f.getAction() == null)
                continue;

            if (f.getAction().equals(""))
                continue;

            if (actionAnn == null) {
                actionAnn = jMethod.annotate(Action.class);
            }
            if (jam == null) {
                jam = actionAnn.paramArray("fault");
            }
            final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
            faAnn.param("className", map.get(f.getName()));
            faAnn.param("value", f.getAction());
        }
    }
}
项目:infobip-open-jdk-8    文件:W3CAddressingJavaGeneratorExtension.java   
@Override
public void writeMethodAnnotations(TWSDLOperation two, JMethod jMethod) {
    JAnnotationUse actionAnn = null;

    if (!(two instanceof Operation))
        return;

    Operation o = ((Operation)two);

    // explicit input action
    if (o.getInput().getAction() != null && !o.getInput().getAction().equals("")) {
        // explicitly specified
        actionAnn = jMethod.annotate(Action.class);
        actionAnn.param("input", o.getInput().getAction());
    }

    // explicit output action
    if (o.getOutput() != null && o.getOutput().getAction() != null && !o.getOutput().getAction().equals("")) {
        // explicitly specified
        if (actionAnn == null)
            actionAnn = jMethod.annotate(Action.class);

        actionAnn.param("output", o.getOutput().getAction());
    }

    // explicit fault action
    if (o.getFaults() != null && o.getFaults().size() > 0) {
        Map<String, JClass> map = o.getFaults();
        JAnnotationArrayMember jam = null;

        for (Fault f : o.faults()) {
            if (f.getAction() == null)
                continue;

            if (f.getAction().equals(""))
                continue;

            if (actionAnn == null) {
                actionAnn = jMethod.annotate(Action.class);
            }
            if (jam == null) {
                jam = actionAnn.paramArray("fault");
            }
            final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
            faAnn.param("className", map.get(f.getName()));
            faAnn.param("value", f.getAction());
        }
    }
}
项目:OLD-OpenJDK8    文件:W3CAddressingJavaGeneratorExtension.java   
@Override
public void writeMethodAnnotations(TWSDLOperation two, JMethod jMethod) {
    JAnnotationUse actionAnn = null;

    if (!(two instanceof Operation))
        return;

    Operation o = ((Operation)two);

    // explicit input action
    if (o.getInput().getAction() != null && !o.getInput().getAction().equals("")) {
        // explicitly specified
        actionAnn = jMethod.annotate(Action.class);
        actionAnn.param("input", o.getInput().getAction());
    }

    // explicit output action
    if (o.getOutput() != null && o.getOutput().getAction() != null && !o.getOutput().getAction().equals("")) {
        // explicitly specified
        if (actionAnn == null)
            actionAnn = jMethod.annotate(Action.class);

        actionAnn.param("output", o.getOutput().getAction());
    }

    // explicit fault action
    if (o.getFaults() != null && o.getFaults().size() > 0) {
        Map<String, JClass> map = o.getFaults();
        JAnnotationArrayMember jam = null;

        for (Fault f : o.faults()) {
            if (f.getAction() == null)
                continue;

            if (f.getAction().equals(""))
                continue;

            if (actionAnn == null) {
                actionAnn = jMethod.annotate(Action.class);
            }
            if (jam == null) {
                jam = actionAnn.paramArray("fault");
            }
            final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
            faAnn.param("className", map.get(f.getName()));
            faAnn.param("value", f.getAction());
        }
    }
}
项目:openjdk-icedtea7    文件:W3CAddressingJavaGeneratorExtension.java   
@Override
public void writeMethodAnnotations(TWSDLOperation two, JMethod jMethod) {
    JAnnotationUse actionAnn = null;

    if (!(two instanceof Operation))
        return;

    Operation o = ((Operation)two);

    // explicit input action
    if (o.getInput().getAction() != null && !o.getInput().getAction().equals("")) {
        // explicitly specified
        actionAnn = jMethod.annotate(Action.class);
        actionAnn.param("input", o.getInput().getAction());
    }

    // explicit output action
    if (o.getOutput() != null && o.getOutput().getAction() != null && !o.getOutput().getAction().equals("")) {
        // explicitly specified
        if (actionAnn == null)
            actionAnn = jMethod.annotate(Action.class);

        actionAnn.param("output", o.getOutput().getAction());
    }

    // explicit fault action
    if (o.getFaults() != null && o.getFaults().size() > 0) {
        Map<String, JClass> map = o.getFaults();
        JAnnotationArrayMember jam = null;

        for (Fault f : o.faults()) {
            if (f.getAction() == null)
                continue;

            if (f.getAction().equals(""))
                continue;

            if (actionAnn == null) {
                actionAnn = jMethod.annotate(Action.class);
            }
            if (jam == null) {
                jam = actionAnn.paramArray("fault");
            }
            final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
            faAnn.param("className", map.get(f.getName()));
            faAnn.param("value", f.getAction());
        }
    }
}