/**
* Reads the value of {@code XmlElementRef.required()}.
*
* If we are working as 2.1 RI, this defaults to true.
*/
private boolean isRequired(XmlElementRef ref) {
if(!is2_2) return true;
try {
return ref.required();
} catch(LinkageError e) {
is2_2 = false;
return true; // the value defaults to true
}
}
java类javax.xml.bind.annotation.XmlElementRef的实例源码
ReferencePropertyInfoImpl.java 文件源码
项目:OpenJSharp
阅读 23
收藏 0
点赞 0
评论 0
ReferencePropertyInfoImpl.java 文件源码
项目:OpenJSharp
阅读 27
收藏 0
点赞 0
评论 0
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
DirectoryScannerConfig.java 文件源码
项目:jdk8u-jdk
阅读 26
收藏 0
点赞 0
评论 0
/**
* Getter for property includeFiles.
* This is an array of filters identifying files that should be selected.
* A file is selected if at least one filter matches.
* @return Value of property includeFiles.
*/
@XmlElementWrapper(name="IncludeFiles",
namespace=XmlConfigUtils.NAMESPACE)
@XmlElementRef
public FileMatch[] getIncludeFiles() {
synchronized(includeFiles) {
return includeFiles.toArray(new FileMatch[0]);
}
}
DirectoryScannerConfig.java 文件源码
项目:jdk8u-jdk
阅读 24
收藏 0
点赞 0
评论 0
/**
* Getter for property excludeFiles.
* This is an array of filters identifying files that should be excluded.
* A file is excluded if at least one filter matches.
* @return Value of property excludeFiles.
*/
@XmlElementWrapper(name="ExcludeFiles",
namespace=XmlConfigUtils.NAMESPACE)
@XmlElementRef
public FileMatch[] getExcludeFiles() {
synchronized(excludeFiles) {
return excludeFiles.toArray(new FileMatch[0]);
}
}
ReferencePropertyInfoImpl.java 文件源码
项目:openjdk-jdk10
阅读 29
收藏 0
点赞 0
评论 0
/**
* Reads the value of {@code XmlElementRef.required()}.
*
* If we are working as 2.1 RI, this defaults to true.
*/
private boolean isRequired(XmlElementRef ref) {
if(!is2_2) return true;
try {
return ref.required();
} catch(LinkageError e) {
is2_2 = false;
return true; // the value defaults to true
}
}
ReferencePropertyInfoImpl.java 文件源码
项目:openjdk-jdk10
阅读 28
收藏 0
点赞 0
评论 0
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
DirectoryScannerConfig.java 文件源码
项目:openjdk9
阅读 23
收藏 0
点赞 0
评论 0
/**
* Getter for property includeFiles.
* This is an array of filters identifying files that should be selected.
* A file is selected if at least one filter matches.
* @return Value of property includeFiles.
*/
@XmlElementWrapper(name="IncludeFiles",
namespace=XmlConfigUtils.NAMESPACE)
@XmlElementRef
public FileMatch[] getIncludeFiles() {
synchronized(includeFiles) {
return includeFiles.toArray(new FileMatch[0]);
}
}
DirectoryScannerConfig.java 文件源码
项目:openjdk9
阅读 28
收藏 0
点赞 0
评论 0
/**
* Getter for property excludeFiles.
* This is an array of filters identifying files that should be excluded.
* A file is excluded if at least one filter matches.
* @return Value of property excludeFiles.
*/
@XmlElementWrapper(name="ExcludeFiles",
namespace=XmlConfigUtils.NAMESPACE)
@XmlElementRef
public FileMatch[] getExcludeFiles() {
synchronized(excludeFiles) {
return excludeFiles.toArray(new FileMatch[0]);
}
}
ReferencePropertyInfoImpl.java 文件源码
项目:openjdk9
阅读 24
收藏 0
点赞 0
评论 0
/**
* Reads the value of {@code XmlElementRef.required()}.
*
* If we are working as 2.1 RI, this defaults to true.
*/
private boolean isRequired(XmlElementRef ref) {
if(!is2_2) return true;
try {
return ref.required();
} catch(LinkageError e) {
is2_2 = false;
return true; // the value defaults to true
}
}
ReferencePropertyInfoImpl.java 文件源码
项目:openjdk9
阅读 36
收藏 0
点赞 0
评论 0
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
PrismBeanInspector.java 文件源码
项目:engerek
阅读 29
收藏 0
点赞 0
评论 0
private Field lookupSubstitutionUncached(Class beanClass, Method elementMethodInObjectFactory) {
XmlElementDecl xmlElementDecl = elementMethodInObjectFactory.getAnnotation(XmlElementDecl.class);
if (xmlElementDecl == null) {
return null;
}
final String substitutionHeadName = xmlElementDecl.substitutionHeadName();
return findField(beanClass, field -> {
XmlElementRef xmlElementRef = field.getAnnotation(XmlElementRef.class);
return xmlElementRef != null && xmlElementRef.name().equals(substitutionHeadName);
});
}
DirectoryScannerConfig.java 文件源码
项目:jdk8u_jdk
阅读 20
收藏 0
点赞 0
评论 0
/**
* Getter for property includeFiles.
* This is an array of filters identifying files that should be selected.
* A file is selected if at least one filter matches.
* @return Value of property includeFiles.
*/
@XmlElementWrapper(name="IncludeFiles",
namespace=XmlConfigUtils.NAMESPACE)
@XmlElementRef
public FileMatch[] getIncludeFiles() {
synchronized(includeFiles) {
return includeFiles.toArray(new FileMatch[0]);
}
}
DirectoryScannerConfig.java 文件源码
项目:jdk8u_jdk
阅读 18
收藏 0
点赞 0
评论 0
/**
* Getter for property excludeFiles.
* This is an array of filters identifying files that should be excluded.
* A file is excluded if at least one filter matches.
* @return Value of property excludeFiles.
*/
@XmlElementWrapper(name="ExcludeFiles",
namespace=XmlConfigUtils.NAMESPACE)
@XmlElementRef
public FileMatch[] getExcludeFiles() {
synchronized(excludeFiles) {
return excludeFiles.toArray(new FileMatch[0]);
}
}
DirectoryScannerConfig.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 34
收藏 0
点赞 0
评论 0
/**
* Getter for property includeFiles.
* This is an array of filters identifying files that should be selected.
* A file is selected if at least one filter matches.
* @return Value of property includeFiles.
*/
@XmlElementWrapper(name="IncludeFiles",
namespace=XmlConfigUtils.NAMESPACE)
@XmlElementRef
public FileMatch[] getIncludeFiles() {
synchronized(includeFiles) {
return includeFiles.toArray(new FileMatch[0]);
}
}
DirectoryScannerConfig.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 24
收藏 0
点赞 0
评论 0
/**
* Getter for property excludeFiles.
* This is an array of filters identifying files that should be excluded.
* A file is excluded if at least one filter matches.
* @return Value of property excludeFiles.
*/
@XmlElementWrapper(name="ExcludeFiles",
namespace=XmlConfigUtils.NAMESPACE)
@XmlElementRef
public FileMatch[] getExcludeFiles() {
synchronized(excludeFiles) {
return excludeFiles.toArray(new FileMatch[0]);
}
}
ReferencePropertyInfoImpl.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 29
收藏 0
点赞 0
评论 0
/**
* Reads the value of {@code XmlElementRef.required()}.
*
* If we are working as 2.1 RI, this defaults to true.
*/
private boolean isRequired(XmlElementRef ref) {
if(!is2_2) return true;
try {
return ref.required();
} catch(LinkageError e) {
is2_2 = false;
return true; // the value defaults to true
}
}
ReferencePropertyInfoImpl.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 36
收藏 0
点赞 0
评论 0
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
EipAnnotationProcessor.java 文件源码
项目:Camel
阅读 30
收藏 0
点赞 0
评论 0
/**
* Special for processing an @XmlElementRef when field
*/
private void processRefWhenClauses(RoundEnvironment roundEnv, TypeElement originalClassType, XmlElementRef elementRef,
VariableElement fieldElement, String fieldName, Set<EipOption> eipOptions, String prefix) {
Elements elementUtils = processingEnv.getElementUtils();
if ("whenClauses".equals(fieldName)) {
String kind = "element";
String name = elementRef.name();
if (isNullOrEmpty(name) || "##default".equals(name)) {
name = fieldName;
}
name = prefix + name;
TypeMirror fieldType = fieldElement.asType();
String fieldTypeName = fieldType.toString();
// find javadoc from original class as it will override the setExpression method where we can provide the javadoc for the given EIP
String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, name, originalClassType, true);
boolean deprecated = fieldElement.getAnnotation(Deprecated.class) != null;
// indicate that this element is one of when
Set<String> oneOfTypes = new HashSet<String>();
oneOfTypes.add("when");
EipOption ep = new EipOption(name, kind, fieldTypeName, false, "", docComment, deprecated, false, null, true, oneOfTypes);
eipOptions.add(ep);
}
}
CasMappings.java 文件源码
项目:biomedicus
阅读 35
收藏 0
点赞 0
评论 0
/**
* Gets the mappings from rtf control words to UIMA annotations.
*
* @return list containing mappings
*/
@XmlElementWrapper(required = true)
@XmlElementRef(name = "controlWordCasMapping")
@Nullable
public List<ControlWordCasMapping> getControlWordCasMappings() {
return controlWordCasMappings;
}
CasMappings.java 文件源码
项目:biomedicus
阅读 26
收藏 0
点赞 0
评论 0
/**
* Gets the mappings from rtf destinations to UIMA CAS views.
*
* @return list of the mappings.
*/
@XmlElementWrapper(required = true)
@XmlElementRef(name = "destinationCasMapping")
@Nullable
public List<DestinationCasMapping> getDestinationCasMappings() {
return destinationCasMappings;
}
VertecSoapCreate.java 文件源码
项目:jira2vertec-Gateway
阅读 30
收藏 0
点赞 0
评论 0
@XmlElementRefs({
@XmlElementRef(name = "OffeneLeistung", type = VertecOffeneLeistung.class),
@XmlElementRef(name = "VerrechneteLeistung", type = VertecVerrechneteLeistung.class),
@XmlElementRef(name = "ProjektBearbeiter", type = VertecProjektBearbeiter.class),
@XmlElementRef(name = "Projekt", type = VertecProject.class),
@XmlElementRef(name = "ProjektPhase", type = VertecPhase.class)})
@XmlAnyElement
public void setItem(T item)
{
this.item = item;
}
VertecSoapUpdate.java 文件源码
项目:jira2vertec-Gateway
阅读 32
收藏 0
点赞 0
评论 0
@XmlElementRefs({
@XmlElementRef(name = "OffeneLeistung", type = VertecOffeneLeistung.class),
@XmlElementRef(name = "VerrechneteLeistung", type = VertecVerrechneteLeistung.class),
@XmlElementRef(name = "ProjektBearbeiter", type = VertecProjektBearbeiter.class),
@XmlElementRef(name = "Projekt", type = VertecProject.class),
@XmlElementRef(name = "ProjektPhase", type = VertecPhase.class)})
@XmlAnyElement
public void setItem(T item)
{
this.item = item;
}
RouteDefinition.java 文件源码
项目:Camel
阅读 24
收藏 0
点赞 0
评论 0
/**
* Outputs are processors that determines how messages are processed by this route.
*/
@XmlElementRef
public void setOutputs(List<ProcessorDefinition<?>> outputs) {
this.outputs = outputs;
if (outputs != null) {
for (ProcessorDefinition<?> output : outputs) {
configureChild(output);
}
}
}
EipAnnotationProcessor.java 文件源码
项目:Camel
阅读 25
收藏 0
点赞 0
评论 0
/**
* Special for processing an @XmlElementRef routes field
*/
private void processRoutes(RoundEnvironment roundEnv, TypeElement originalClassType, XmlElementRef elementRef,
VariableElement fieldElement, String fieldName, Set<EipOption> eipOptions, String prefix) {
if ("routes".equals(fieldName)) {
TypeMirror fieldType = fieldElement.asType();
String fieldTypeName = fieldType.toString();
Set<String> oneOfTypes = new TreeSet<String>();
oneOfTypes.add("route");
EipOption ep = new EipOption("routes", "element", fieldTypeName, false, "", "Contains the Camel routes", false, false, null, true, oneOfTypes);
eipOptions.add(ep);
}
}
EipAnnotationProcessor.java 文件源码
项目:Camel
阅读 28
收藏 0
点赞 0
评论 0
/**
* Special for processing an @XmlElementRef rests field
*/
private void processRests(RoundEnvironment roundEnv, TypeElement originalClassType, XmlElementRef elementRef,
VariableElement fieldElement, String fieldName, Set<EipOption> eipOptions, String prefix) {
if ("rests".equals(fieldName)) {
TypeMirror fieldType = fieldElement.asType();
String fieldTypeName = fieldType.toString();
Set<String> oneOfTypes = new TreeSet<String>();
oneOfTypes.add("rest");
EipOption ep = new EipOption("rests", "element", fieldTypeName, false, "", "Contains the rest services defined using the rest-dsl", false, false, null, true, oneOfTypes);
eipOptions.add(ep);
}
}
EipAnnotationProcessor.java 文件源码
项目:Camel
阅读 25
收藏 0
点赞 0
评论 0
/**
* Special for processing an @XmlElementRef outputs field
*/
private void processOutputs(RoundEnvironment roundEnv, TypeElement originalClassType, XmlElementRef elementRef,
VariableElement fieldElement, String fieldName, Set<EipOption> eipOptions, String prefix) {
if ("outputs".equals(fieldName) && supportOutputs(originalClassType)) {
String kind = "element";
String name = elementRef.name();
if (isNullOrEmpty(name) || "##default".equals(name)) {
name = fieldName;
}
name = prefix + name;
TypeMirror fieldType = fieldElement.asType();
String fieldTypeName = fieldType.toString();
// gather oneOf which extends any of the output base classes
Set<String> oneOfTypes = new TreeSet<String>();
// find all classes that has that superClassName
Set<TypeElement> children = new LinkedHashSet<TypeElement>();
for (String superclass : ONE_OF_OUTPUTS) {
findTypeElementChildren(roundEnv, children, superclass);
}
for (TypeElement child : children) {
XmlRootElement rootElement = child.getAnnotation(XmlRootElement.class);
if (rootElement != null) {
String childName = rootElement.name();
if (childName != null) {
oneOfTypes.add(childName);
}
}
}
// remove some types which are not intended as an output in eips
oneOfTypes.remove("route");
EipOption ep = new EipOption(name, kind, fieldTypeName, true, "", "", false, false, null, true, oneOfTypes);
eipOptions.add(ep);
}
}
EipAnnotationProcessor.java 文件源码
项目:Camel
阅读 28
收藏 0
点赞 0
评论 0
/**
* Special for processing an @XmlElementRef verbs field (rest-dsl)
*/
private void processVerbs(RoundEnvironment roundEnv, TypeElement originalClassType, XmlElementRef elementRef,
VariableElement fieldElement, String fieldName, Set<EipOption> eipOptions, String prefix) {
Elements elementUtils = processingEnv.getElementUtils();
if ("verbs".equals(fieldName) && supportOutputs(originalClassType)) {
String kind = "element";
String name = elementRef.name();
if (isNullOrEmpty(name) || "##default".equals(name)) {
name = fieldName;
}
name = prefix + name;
TypeMirror fieldType = fieldElement.asType();
String fieldTypeName = fieldType.toString();
String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, name, originalClassType, true);
// gather oneOf which extends any of the output base classes
Set<String> oneOfTypes = new TreeSet<String>();
// find all classes that has that superClassName
Set<TypeElement> children = new LinkedHashSet<TypeElement>();
for (String superclass : ONE_OF_VERBS) {
findTypeElementChildren(roundEnv, children, superclass);
}
for (TypeElement child : children) {
XmlRootElement rootElement = child.getAnnotation(XmlRootElement.class);
if (rootElement != null) {
String childName = rootElement.name();
if (childName != null) {
oneOfTypes.add(childName);
}
}
}
EipOption ep = new EipOption(name, kind, fieldTypeName, true, "", docComment, false, false, null, true, oneOfTypes);
eipOptions.add(ep);
}
}
XmlElementRefsQuick.java 文件源码
项目:OpenJSharp
阅读 20
收藏 0
点赞 0
评论 0
public XmlElementRef[] value() {
return core.value();
}
XmlElementRefQuick.java 文件源码
项目:OpenJSharp
阅读 23
收藏 0
点赞 0
评论 0
public XmlElementRefQuick(Locatable upstream, XmlElementRef core) {
super(upstream);
this.core = core;
}
XmlElementRefQuick.java 文件源码
项目:OpenJSharp
阅读 30
收藏 0
点赞 0
评论 0
protected Quick newInstance(Locatable upstream, Annotation core) {
return new XmlElementRefQuick(upstream, ((XmlElementRef) core));
}