热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

com.sun.tools.xjc.outline.FieldOutline.getRawType()方法的使用及代码示例

本文整理了Java中com.sun.tools.xjc.outline.FieldOutline.getRawType()方法的一些代码示例,展示了Fiel

本文整理了Java中com.sun.tools.xjc.outline.FieldOutline.getRawType()方法的一些代码示例,展示了FieldOutline.getRawType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FieldOutline.getRawType()方法的具体详情如下:
包路径:com.sun.tools.xjc.outline.FieldOutline
类名称:FieldOutline
方法名:getRawType

FieldOutline.getRawType介绍

[英]Gets the type of the "raw value".

This type can represent the entire value of this field. For fields that can carry multiple values, this is an array.

This type allows the client of the outline to generate code to set/get values from a property.
[中]获取“原始值”的类型。
此类型可以表示此字段的整个值。对于可以携带多个值的字段,这是一个数组。
此类型允许大纲的客户端生成代码,以从属性设置/获取值。

代码示例

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

public JType getRawType() {
return core.getRawType();
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

public final JType type() {
return fr.getRawType();
}
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

public final JType type() {
return fr.getRawType();
}
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

public final JType type() {
return fr.getRawType();
}
}

代码示例来源:origin: apache/servicemix-bundles

public final JType type() {
return fr.getRawType();
}
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

public final JType type() {
return fr.getRawType();
}
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

PropertyImpl( Mapping parent, FieldOutline fr, QName elementName ) {
this.parent = parent;
this.fr = fr;
this.elementName = elementName;
this.codeModel = fr.getRawType().owner();
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

PropertyImpl( Mapping parent, FieldOutline fr, QName elementName ) {
this.parent = parent;
this.fr = fr;
this.elementName = elementName;
this.codeModel = fr.getRawType().owner();
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

PropertyImpl( Mapping parent, FieldOutline fr, QName elementName ) {
this.parent = parent;
this.fr = fr;
this.elementName = elementName;
this.codeModel = fr.getRawType().owner();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

PropertyImpl( Mapping parent, FieldOutline fr, QName elementName ) {
this.parent = parent;
this.fr = fr;
this.elementName = elementName;
this.codeModel = fr.getRawType().owner();
}

代码示例来源:origin: apache/servicemix-bundles

PropertyImpl( Mapping parent, FieldOutline fr, QName elementName ) {
this.parent = parent;
this.fr = fr;
this.elementName = elementName;
this.codeModel = fr.getRawType().owner();
}

代码示例来源:origin: jpmml/jpmml-model

@Override
public boolean test(FieldOutline fieldOutline){
CPropertyInfo propertyInfo = fieldOutline.getPropertyInfo();
if(("extensions").equals(propertyInfo.getName(false)) && propertyInfo.isCollection()){
JType elementType = CodeModelUtil.getElementType(fieldOutline.getRawType());
return checkType(elementType, "org.dmg.pmml.Extension");
}
return false;
}
};

代码示例来源:origin: jpmml/jpmml-model

@Override
public boolean test(FieldOutline fieldOutline){
CPropertyInfo propertyInfo = fieldOutline.getPropertyInfo();
if(propertyInfo.isCollection()){
JType elementType = CodeModelUtil.getElementType(fieldOutline.getRawType());
String name = elementType.name();
return ((this.name).equals(name + "s") || (this.name).equals(JJavaName.getPluralForm(name)));
}
return false;
}
};

代码示例来源:origin: com.seovic.coherence/pof

/**
* Returns the setter method for a given field.
*
* @param fieldOutline field outline
* @return setter for the specified field
*/
protected JMethod setter(FieldOutline fieldOutline) {
JDefinedClass theClass = fieldOutline.parent().implClass;
String publicName = fieldOutline.getPropertyInfo().getName(true);
return theClass.getMethod("set" + publicName, new JType[] {fieldOutline.getRawType()});
}
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

public void toRawValue(JBlock block, JVar $var) {
// [RESULT]
// if([core.hasSetValue])
// $var = [core.toRawValue].getValue();
// else
// $var = null;
JConditional cOnd= block._if(acc.hasSetValue());
JVar $v = cond._then().decl(core.getRawType(), "v" + hashCode());// TODO: unique value control
acc.toRawValue(cond._then(),$v);
cond._then().assign($var,$v.invoke("getValue"));
cond._else().assign($var, JExpr._null());
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

public void toRawValue(JBlock block, JVar $var) {
// [RESULT]
// if([core.hasSetValue])
// $var = [core.toRawValue].getValue();
// else
// $var = null;
JConditional cOnd= block._if(acc.hasSetValue());
JVar $v = cond._then().decl(core.getRawType(), "v" + hashCode());// TODO: unique value control
acc.toRawValue(cond._then(),$v);
cond._then().assign($var,$v.invoke("getValue"));
cond._else().assign($var, JExpr._null());
}

代码示例来源:origin: apache/servicemix-bundles

public void toRawValue(JBlock block, JVar $var) {
// [RESULT]
// if([core.hasSetValue])
// $var = [core.toRawValue].getValue();
// else
// $var = null;
JConditional cOnd= block._if(acc.hasSetValue());
JVar $v = cond._then().decl(core.getRawType(), "v" + hashCode());// TODO: unique value control
acc.toRawValue(cond._then(),$v);
cond._then().assign($var,$v.invoke("getValue"));
cond._else().assign($var, JExpr._null());
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

public void toRawValue(JBlock block, JVar $var) {
// [RESULT]
// if([core.hasSetValue])
// $var = [core.toRawValue].getValue();
// else
// $var = null;
JConditional cOnd= block._if(acc.hasSetValue());
JVar $v = cond._then().decl(core.getRawType(), "v" + hashCode());// TODO: unique value control
acc.toRawValue(cond._then(),$v);
cond._then().assign($var,$v.invoke("getValue"));
cond._else().assign($var, JExpr._null());
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

public void toRawValue(JBlock block, JVar $var) {
// [RESULT]
// if([core.hasSetValue])
// $var = [core.toRawValue].getValue();
// else
// $var = null;
JConditional cOnd= block._if(acc.hasSetValue());
JVar $v = cond._then().decl(core.getRawType(), "v" + hashCode());// TODO: unique value control
acc.toRawValue(cond._then(),$v);
cond._then().assign($var,$v.invoke("getValue"));
cond._else().assign($var, JExpr._null());
}

代码示例来源:origin: sabomichal/immutable-xjc

private JMethod addWithIfNotNullMethod(JDefinedClass builderClass, FieldOutline field, JMethod unconditionalWithMethod) {
if (field.getRawType().isPrimitive())
return null;
String fieldName = field.getPropertyInfo().getName(true);
JMethod method = builderClass.method(JMod.PUBLIC, builderClass, "with" + fieldName + "IfNotNull");
JVar param = generateMethodParameter(method, field);
JBlock block = method.body();
JConditional cOnditional= block._if(param.eq(JExpr._null()));
conditional._then()._return(JExpr.direct("this"));
conditional._else()._return(JExpr.invoke(unconditionalWithMethod).arg(param));
return method;
}

推荐阅读
author-avatar
66顺主管386711
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有