本文整理了Java中javax.xml.bind.annotation.XmlSchemaTypes.value()
方法的一些代码示例,展示了XmlSchemaTypes.value()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlSchemaTypes.value()
方法的具体详情如下:
包路径:javax.xml.bind.annotation.XmlSchemaTypes
类名称:XmlSchemaTypes
方法名:value
暂无
代码示例来源:origin: com.sun.xml.bind/jaxb-impl
static <T,C,F,M> QName calcSchemaType(
AnnotationReader<T,C,F,M> reader,
AnnotationSource primarySource, C enclosingClass, T individualType, Locatable src ) {
XmlSchemaType xst = primarySource.readAnnotation(XmlSchemaType.class);
if(xst!=null) {
return new QName(xst.namespace(),xst.name());
}
// check the defaulted annotation
XmlSchemaTypes xsts = reader.getPackageAnnotation(XmlSchemaTypes.class,enclosingClass,src);
XmlSchemaType[] values = null;
if(xsts!=null)
values = xsts.value();
else {
xst = reader.getPackageAnnotation(XmlSchemaType.class,enclosingClass,src);
if(xst!=null) {
values = new XmlSchemaType[1];
values[0] = xst;
}
}
if(values!=null) {
for( XmlSchemaType item : values ) {
if(reader.getClassValue(item,"type").equals(individualType)) {
return new QName(item.namespace(),item.name());
}
}
}
return null;
}
代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime
static <T,C,F,M> QName calcSchemaType(
AnnotationReader<T,C,F,M> reader,
AnnotationSource primarySource, C enclosingClass, T individualType, Locatable src ) {
XmlSchemaType xst = primarySource.readAnnotation(XmlSchemaType.class);
if(xst!=null) {
return new QName(xst.namespace(),xst.name());
}
// check the defaulted annotation
XmlSchemaTypes xsts = reader.getPackageAnnotation(XmlSchemaTypes.class,enclosingClass,src);
XmlSchemaType[] values = null;
if(xsts!=null)
values = xsts.value();
else {
xst = reader.getPackageAnnotation(XmlSchemaType.class,enclosingClass,src);
if(xst!=null) {
values = new XmlSchemaType[1];
values[0] = xst;
}
}
if(values!=null) {
for( XmlSchemaType item : values ) {
if(reader.getClassValue(item,"type").equals(individualType)) {
return new QName(item.namespace(),item.name());
}
}
}
return null;
}
代码示例来源:origin: stoicflame/enunciate
allSpecifiedTypes.addAll(Arrays.asList(schemaTypes.value()));
代码示例来源:origin: com.webcohesion.enunciate/enunciate-jaxb
allSpecifiedTypes.addAll(Arrays.asList(schemaTypes.value()));
代码示例来源:origin: apache/servicemix-bundles
static <T,C,F,M> QName calcSchemaType(
AnnotationReader<T,C,F,M> reader,
AnnotationSource primarySource, C enclosingClass, T individualType, Locatable src ) {
XmlSchemaType xst = primarySource.readAnnotation(XmlSchemaType.class);
if(xst!=null) {
return new QName(xst.namespace(),xst.name());
}
// check the defaulted annotation
XmlSchemaTypes xsts = reader.getPackageAnnotation(XmlSchemaTypes.class,enclosingClass,src);
XmlSchemaType[] values = null;
if(xsts!=null)
values = xsts.value();
else {
xst = reader.getPackageAnnotation(XmlSchemaType.class,enclosingClass,src);
if(xst!=null) {
values = new XmlSchemaType[1];
values[0] = xst;
}
}
if(values!=null) {
for( XmlSchemaType item : values ) {
if(reader.getClassValue(item,"type").equals(individualType)) {
return new QName(item.namespace(),item.name());
}
}
}
return null;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl
static <T,C,F,M> QName calcSchemaType(
AnnotationReader<T,C,F,M> reader,
AnnotationSource primarySource, C enclosingClass, T individualType, Locatable src ) {
XmlSchemaType xst = primarySource.readAnnotation(XmlSchemaType.class);
if(xst!=null) {
return new QName(xst.namespace(),xst.name());
}
// check the defaulted annotation
XmlSchemaTypes xsts = reader.getPackageAnnotation(XmlSchemaTypes.class,enclosingClass,src);
XmlSchemaType[] values = null;
if(xsts!=null)
values = xsts.value();
else {
xst = reader.getPackageAnnotation(XmlSchemaType.class,enclosingClass,src);
if(xst!=null) {
values = new XmlSchemaType[1];
values[0] = xst;
}
}
if(values!=null) {
for( XmlSchemaType item : values ) {
if(reader.getClassValue(item,"type").equals(individualType)) {
return new QName(item.namespace(),item.name());
}
}
}
return null;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
allSpecifiedTypes.addAll(Arrays.asList(schemaTypes.value()));
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
allSpecifiedTypes.addAll(Arrays.asList(schemaTypes.value()));
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Process any @XmlSchemaType(s).
*
* @param javaClass
* @param info
*/
private void processSchemaTypes(JavaClass javaClass, TypeInfo info) {
JavaPackage pack = javaClass.getPackage();
if (helper.isAnnotationPresent(pack, XmlSchemaTypes.class)) {
XmlSchemaTypes types = (XmlSchemaTypes) helper.getAnnotation(pack, XmlSchemaTypes.class);
XmlSchemaType[] typeArray = types.value();
for (XmlSchemaType next : typeArray) {
processSchemaType(next);
}
} else if (helper.isAnnotationPresent(pack, XmlSchemaType.class)) {
processSchemaType((XmlSchemaType) helper.getAnnotation(pack, XmlSchemaType.class));
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.moxy
/**
* Process any @XmlSchemaType(s).
*
* @param javaClass
* @param info
*/
private void processSchemaTypes(JavaClass javaClass, TypeInfo info) {
JavaPackage pack = javaClass.getPackage();
if (helper.isAnnotationPresent(pack, XmlSchemaTypes.class)) {
XmlSchemaTypes types = (XmlSchemaTypes) helper.getAnnotation(pack, XmlSchemaTypes.class);
XmlSchemaType[] typeArray = types.value();
for (XmlSchemaType next : typeArray) {
processSchemaType(next);
}
} else if (helper.isAnnotationPresent(pack, XmlSchemaType.class)) {
processSchemaType((XmlSchemaType) helper.getAnnotation(pack, XmlSchemaType.class));
}
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
public ValidationResult validatePackage(Schema schema) {
ValidationResult result = new ValidationResult();
XmlSchemaType schemaType = schema.getAnnotation(XmlSchemaType.class);
if (schemaType != null) {
try {
if (schemaType.type() == XmlSchemaType.DEFAULT.class) {
result.addError(schema, "A type must be specified at the package-level for @XmlSchemaType.");
}
}
catch (MirroredTypeException e) {
//fall through. Implies the type was set.
}
}
XmlSchemaTypes schemaTypes = schema.getAnnotation(XmlSchemaTypes.class);
if (schemaTypes != null) {
for (XmlSchemaType xmlSchemaType : schemaTypes.value()) {
try {
if (xmlSchemaType.type() == XmlSchemaType.DEFAULT.class) {
result.addError(schema, "A type must be specified at the package-level for all types of @XmlSchemaTypes.");
}
}
catch (MirroredTypeException e) {
//fall through. Implies the type was set.
}
}
}
return result;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
public ValidationResult validatePackage(Schema schema) {
ValidationResult result = new ValidationResult();
XmlSchemaType schemaType = schema.getAnnotation(XmlSchemaType.class);
if (schemaType != null) {
try {
if (schemaType.type() == XmlSchemaType.DEFAULT.class) {
result.addError(schema.getPosition(), "A type must be specified at the package-level for @XmlSchemaType.");
}
}
catch (MirroredTypeException e) {
//fall through. Implies the type was set.
}
}
XmlSchemaTypes schemaTypes = schema.getAnnotation(XmlSchemaTypes.class);
if (schemaTypes != null) {
for (XmlSchemaType xmlSchemaType : schemaTypes.value()) {
try {
if (xmlSchemaType.type() == XmlSchemaType.DEFAULT.class) {
result.addError(schema.getPosition(), "A type must be specified at the package-level for all types of @XmlSchemaTypes.");
}
}
catch (MirroredTypeException e) {
//fall through. Implies the type was set.
}
}
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!