本文整理汇总了Java中com.sun.codemodel.internal.JAnnotationArrayMember类的典型用法代码示例。如果您正苦于以下问题:Java JAnnotationArrayMember类的具体用法?Java JAnnotationArrayMember怎么用?Java JAnnotationArrayMember使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JAnnotationArrayMember类属于com.sun.codemodel.internal包,在下文中一共展示了JAnnotationArrayMember类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: writeXmlTypeDeclaration
import com.sun.codemodel.internal.JAnnotationArrayMember; //导入依赖的package包/类
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());
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:WebServiceWrapperGenerator.java
示例2: writeMethodAnnotations
import com.sun.codemodel.internal.JAnnotationArrayMember; //导入依赖的package包/类
@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());
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:50,代码来源:W3CAddressingJavaGeneratorExtension.java
注:本文中的com.sun.codemodel.internal.JAnnotationArrayMember类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论