Java 类javax.xml.bind.annotation.XmlAnyElement 实例源码

项目:OpenJSharp    文件:ReferencePropertyInfoImpl.java   
public ReferencePropertyInfoImpl(
    ClassInfoImpl<T,C,F,M> classInfo,
    PropertySeed<T,C,F,M> seed) {

    super(classInfo, seed);

    isMixed = seed.readAnnotation(XmlMixed.class) != null;

    XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class);
    if(xae==null) {
        wildcard = null;
        domHandler = null;
    } else {
        wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP;
        domHandler = nav().asDecl(reader().getClassValue(xae,"value"));
    }
}
项目:openjdk-jdk10    文件:ReferencePropertyInfoImpl.java   
public ReferencePropertyInfoImpl(
    ClassInfoImpl<T,C,F,M> classInfo,
    PropertySeed<T,C,F,M> seed) {

    super(classInfo, seed);

    isMixed = seed.readAnnotation(XmlMixed.class) != null;

    XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class);
    if(xae==null) {
        wildcard = null;
        domHandler = null;
    } else {
        wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP;
        domHandler = nav().asDecl(reader().getClassValue(xae,"value"));
    }
}
项目:openjdk9    文件:ReferencePropertyInfoImpl.java   
public ReferencePropertyInfoImpl(
    ClassInfoImpl<T,C,F,M> classInfo,
    PropertySeed<T,C,F,M> seed) {

    super(classInfo, seed);

    isMixed = seed.readAnnotation(XmlMixed.class) != null;

    XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class);
    if(xae==null) {
        wildcard = null;
        domHandler = null;
    } else {
        wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP;
        domHandler = nav().asDecl(reader().getClassValue(xae,"value"));
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:ReferencePropertyInfoImpl.java   
public ReferencePropertyInfoImpl(
    ClassInfoImpl<T,C,F,M> classInfo,
    PropertySeed<T,C,F,M> seed) {

    super(classInfo, seed);

    isMixed = seed.readAnnotation(XmlMixed.class) != null;

    XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class);
    if(xae==null) {
        wildcard = null;
        domHandler = null;
    } else {
        wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP;
        domHandler = nav().asDecl(reader().getClassValue(xae,"value"));
    }
}
项目:cibet    文件:AnnotationUtilTest.java   
@Test
public void setValueFromAnnotationSub() {
   SubSub4EyesController co = new SubSub4EyesController();
   AnnotationUtil.setValueToAnnotatedFieldOrSetter(co, XmlValue.class, 5);
   Assert.assertTrue(co.getDummy1() == 5);

   AnnotationUtil.setValueToAnnotatedFieldOrSetter(co, XmlElement.class, 33);
   Assert.assertTrue(co.getDummy1() == 33);

   try {
      AnnotationUtil.setValueToAnnotatedFieldOrSetter(co, XmlValue.class, null);
      Assert.fail();
   } catch (IllegalArgumentException e) {
      // okay
   }

   AnnotationUtil.setValueToAnnotatedFieldOrSetter(co, XmlTransient.class, true);
   Assert.assertTrue(co.isDummy2() == true);
   AnnotationUtil.setValueToAnnotatedFieldOrSetter(co, XmlTransient.class, false);
   Assert.assertTrue(co.isDummy2() == false);

   AnnotationUtil.setValueToAnnotatedFieldOrSetter(co, XmlAnyElement.class, 55);
   Assert.assertTrue(co.getDummy1() == 55);
}
项目:infobip-open-jdk-8    文件:ReferencePropertyInfoImpl.java   
public ReferencePropertyInfoImpl(
    ClassInfoImpl<T,C,F,M> classInfo,
    PropertySeed<T,C,F,M> seed) {

    super(classInfo, seed);

    isMixed = seed.readAnnotation(XmlMixed.class) != null;

    XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class);
    if(xae==null) {
        wildcard = null;
        domHandler = null;
    } else {
        wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP;
        domHandler = nav().asDecl(reader().getClassValue(xae,"value"));
    }
}
项目:cxf-plus    文件:ReferencePropertyInfoImpl.java   
public ReferencePropertyInfoImpl(
    ClassInfoImpl<T,C,F,M> classInfo,
    PropertySeed<T,C,F,M> seed) {

    super(classInfo, seed);

    isMixed = seed.readAnnotation(XmlMixed.class) != null;

    XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class);
    if(xae==null) {
        wildcard = null;
        domHandler = null;
    } else {
        wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP;
        domHandler = nav().asDecl(reader().getClassValue(xae,"value"));
    }
}
项目:OLD-OpenJDK8    文件:ReferencePropertyInfoImpl.java   
public ReferencePropertyInfoImpl(
    ClassInfoImpl<T,C,F,M> classInfo,
    PropertySeed<T,C,F,M> seed) {

    super(classInfo, seed);

    isMixed = seed.readAnnotation(XmlMixed.class) != null;

    XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class);
    if(xae==null) {
        wildcard = null;
        domHandler = null;
    } else {
        wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP;
        domHandler = nav().asDecl(reader().getClassValue(xae,"value"));
    }
}
项目:openjdk-icedtea7    文件:ReferencePropertyInfoImpl.java   
public ReferencePropertyInfoImpl(
    ClassInfoImpl<T,C,F,M> classInfo,
    PropertySeed<T,C,F,M> seed) {

    super(classInfo, seed);

    isMixed = seed.readAnnotation(XmlMixed.class) != null;

    XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class);
    if(xae==null) {
        wildcard = null;
        domHandler = null;
    } else {
        wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP;
        domHandler = nav().asDecl(reader().getClassValue(xae,"value"));
    }
}
项目:engerek    文件:PrismForJAXBUtil.java   
private static <T> Field getAnyField(Class<T> clazz) {
    for (Field field: clazz.getDeclaredFields()) {
        XmlAnyElement xmlAnyElementAnnotation = field.getAnnotation(XmlAnyElement.class);
        if (xmlAnyElementAnnotation != null) {
            return field;
        }
    }
    return null;
}
项目:engerek    文件:JAXBUtil.java   
private static Method lookForXsdAnyElementMethod(Object jaxbObject) {
    Class<? extends Object> jaxbClass = jaxbObject.getClass();
    for (Method method: jaxbClass.getMethods()) {
        for (Annotation annotation: method.getAnnotations()) {
            if (annotation.annotationType().isAssignableFrom(XmlAnyElement.class)) {
                return method;
            }
        }
    }
    return null;
}
项目:jira2vertec-Gateway    文件:VertecSoapCreate.java   
@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;
}
项目:jira2vertec-Gateway    文件:VertecSoapUpdate.java   
@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;
}
项目:kc-rice    文件:ImmutableJaxbGenerator.java   
private void renderFutureElementsField(JDefinedClass classModel) throws Exception {
    JType collectionType = codeModel.parseType("java.util.Collection<org.w3c.dom.Element>");
    JFieldVar field = classModel.field(JMod.PRIVATE | JMod.FINAL, collectionType, "_futureElements");
    field.init(JExpr._null());
    JAnnotationUse annotation = field.annotate(SuppressWarnings.class);
    annotation.param("value", "unused");
    field.annotate(XmlAnyElement.class);
}
项目:AutomotiveServiceBus    文件:SetParameterImpl.java   
@Override
@XmlElementWrapper(name = "parameters")
@XmlAnyElement(lax = true)
public List<Parameter> getParameters() {
    if (getService() != null) {
        for (Parameter parameter : this.parameters) {
            ((ParameterImpl) parameter).setService(getService());
        }
    }
    return parameters;
}
项目:jaxb2-basics    文件:JIIB10Test.java   
public void testXmlAnyElementLax() throws Exception {

        final Field contentField = IssueJIIB10Type.class.getDeclaredField("content");
        final XmlAnyElement xmlAnyElementAnnotation = contentField
                .getAnnotation(XmlAnyElement.class);
        Assert.assertTrue(xmlAnyElementAnnotation.lax());
    }
项目:midpoint    文件:PrismForJAXBUtil.java   
private static <T> Field getAnyField(Class<T> clazz) {
    for (Field field: clazz.getDeclaredFields()) {
        XmlAnyElement xmlAnyElementAnnotation = field.getAnnotation(XmlAnyElement.class);
        if (xmlAnyElementAnnotation != null) {
            return field;
        }
    }
    return null;
}
项目:midpoint    文件:JAXBUtil.java   
private static Method lookForXsdAnyElementMethod(Object jaxbObject) {
    Class<? extends Object> jaxbClass = jaxbObject.getClass();
    for (Method method: jaxbClass.getMethods()) {
        for (Annotation annotation: method.getAnnotations()) {
            if (annotation.annotationType().isAssignableFrom(XmlAnyElement.class)) {
                return method;
            }
        }
    }
    return null;
}
项目:controller-client-java    文件:ApiList.java   
@XmlAnyElement(lax = true)
public List<T> getList() {
    if (list == null) {
        list = new ArrayList<T>();
    }
    return this.list;
}
项目:rice    文件:ImmutableJaxbGenerator.java   
private void renderFutureElementsField(JDefinedClass classModel) throws Exception {
    JType collectionType = codeModel.parseType("java.util.Collection<org.w3c.dom.Element>");
    JFieldVar field = classModel.field(JMod.PRIVATE | JMod.FINAL, collectionType, "_futureElements");
    field.init(JExpr._null());
    JAnnotationUse annotation = field.annotate(SuppressWarnings.class);
    annotation.param("value", "unused");
    field.annotate(XmlAnyElement.class);
}
项目:niftyeditor    文件:GEffectsNode.java   
@XmlAnyElement
public List<JAXBElement<GEffect>> getEffectsXml(){
    List<JAXBElement<GEffect>> res = new LinkedList<JAXBElement<GEffect>>();
    for(GEffect effect : effects){
        res.add(new JAXBElement<GEffect>(new QName(effect.getEventType().toString()),GEffect.class, effect));
    }
    return res;
}
项目:midpoint    文件:PrismForJAXBUtil.java   
private static <T> Field getAnyField(Class<T> clazz) {
    for (Field field: clazz.getDeclaredFields()) {
        XmlAnyElement xmlAnyElementAnnotation = field.getAnnotation(XmlAnyElement.class);
        if (xmlAnyElementAnnotation != null) {
            return field;
        }
    }
    return null;
}
项目:midpoint    文件:JAXBUtil.java   
private static Method lookForXsdAnyElementMethod(Object jaxbObject) {
    Class<? extends Object> jaxbClass = jaxbObject.getClass();
    for (Method method: jaxbClass.getMethods()) {
        for (Annotation annotation: method.getAnnotations()) {
            if (annotation.annotationType().isAssignableFrom(XmlAnyElement.class)) {
                return method;
            }
        }
    }
    return null;
}
项目:kuali_rice    文件:ImmutableJaxbGenerator.java   
private void renderFutureElementsField(JDefinedClass classModel) throws Exception {
    JType collectionType = codeModel.parseType("java.util.Collection<org.w3c.dom.Element>");
    JFieldVar field = classModel.field(JMod.PRIVATE | JMod.FINAL, collectionType, "_futureElements");
    field.init(JExpr._null());
    JAnnotationUse annotation = field.annotate(SuppressWarnings.class);
    annotation.param("value", "unused");
    field.annotate(XmlAnyElement.class);
}
项目:dhtmlx-isis-viewer    文件:DataViewItem.java   
@XmlAnyElement
    public List<JAXBElement<String>> getMonths() {
    List<JAXBElement<String>> elements = new ArrayList<JAXBElement<String>>();
    for (Map.Entry<String, String> month: data.entrySet())
        elements.add(new JAXBElement(new QName(month.getKey()),
                                     String.class, month.getValue()));
    return elements;
}
项目:emf-rest    文件:DaughterImpl.java   
/**
 * <!-- begin-user-doc -->
 * XX 10
 * <!-- end-user-doc -->
 * @generated
 */  
@XmlAnyElement(lax=true)

public Family getFamily() {
    if (eContainerFeatureID() != ExamplePackage.DAUGHTER__FAMILY) return null;
    return (Family)eInternalContainer();
}
项目:emf-rest    文件:ParentImpl.java   
/**
 * <!-- begin-user-doc -->
 * XX 10
 * <!-- end-user-doc -->
 * @generated
 */  
@XmlAnyElement(lax=true)

public Family getFamily() {
    if (eContainerFeatureID() != ExamplePackage.PARENT__FAMILY) return null;
    return (Family)eInternalContainer();
}
项目:emf-rest    文件:SonImpl.java   
/**
 * <!-- begin-user-doc -->
 * XX 10
 * <!-- end-user-doc -->
 * @generated
 */  
@XmlAnyElement(lax=true)

public Family getFamily() {
    if (eContainerFeatureID() != ExamplePackage.SON__FAMILY) return null;
    return (Family)eInternalContainer();
}
项目:emf-rest    文件:FamilyImpl.java   
/**
 * <!-- begin-user-doc -->
 * XX 10
 * <!-- end-user-doc -->
 * @generated
 */ 
@XmlElementWrapper(name =  "parents")    
@XmlAnyElement(lax=true)

public EList<Parent> getParents() {
    if (parents == null) {
        parents = new EObjectContainmentWithInverseEList<Parent>(Parent.class, this, ExamplePackage.FAMILY__PARENTS, ExamplePackage.PARENT__FAMILY);
    }
    return parents;
}
项目:emf-rest    文件:FamilyImpl.java   
/**
 * <!-- begin-user-doc -->
 * XX 10
 * <!-- end-user-doc -->
 * @generated
 */ 
@XmlElementWrapper(name =  "sons")   
@XmlAnyElement(lax=true)

public EList<Son> getSons() {
    if (sons == null) {
        sons = new EObjectContainmentWithInverseEList<Son>(Son.class, this, ExamplePackage.FAMILY__SONS, ExamplePackage.SON__FAMILY);
    }
    return sons;
}
项目:emf-rest    文件:FamilyImpl.java   
/**
 * <!-- begin-user-doc -->
 * XX 10
 * <!-- end-user-doc -->
 * @generated
 */ 
@XmlElementWrapper(name =  "daughters")  
@XmlAnyElement(lax=true)

public EList<Daughter> getDaughters() {
    if (daughters == null) {
        daughters = new EObjectContainmentWithInverseEList<Daughter>(Daughter.class, this, ExamplePackage.FAMILY__DAUGHTERS, ExamplePackage.DAUGHTER__FAMILY);
    }
    return daughters;
}
项目:emf-rest    文件:FamilyImpl.java   
/**
 * <!-- begin-user-doc -->
 * XX 10
 * <!-- end-user-doc -->
 * @generated
 */ 
@XmlElementWrapper(name =  "pets")   
@XmlAnyElement(lax=true)

public EList<Pet> getPets() {
    if (pets == null) {
        pets = new EObjectContainmentEList<Pet>(Pet.class, this, ExamplePackage.FAMILY__PETS);
    }
    return pets;
}
项目:emf-rest    文件:DaughterImpl.java   
/**
 * <!-- begin-user-doc -->
 * Z1
 * <!-- end-user-doc -->
 * @generated
 */  
@XmlAnyElement(lax=true)
@XmlJavaTypeAdapter(value=FamilyAdapter.class)

public Family getFamily() {
    if (eContainerFeatureID() != ExamplePackage.DAUGHTER__FAMILY) return null;
    return (Family)eInternalContainer();
}
项目:emf-rest    文件:ParentImpl.java   
/**
 * <!-- begin-user-doc -->
 * Z1
 * <!-- end-user-doc -->
 * @generated
 */  
@XmlAnyElement(lax=true)
@XmlJavaTypeAdapter(value=FamilyAdapter.class)

public Family getFamily() {
    if (eContainerFeatureID() != ExamplePackage.PARENT__FAMILY) return null;
    return (Family)eInternalContainer();
}
项目:emf-rest    文件:SonImpl.java   
/**
 * <!-- begin-user-doc -->
 * Z1
 * <!-- end-user-doc -->
 * @generated
 */  
@XmlAnyElement(lax=true)
@XmlJavaTypeAdapter(value=FamilyAdapter.class)

public Family getFamily() {
    if (eContainerFeatureID() != ExamplePackage.SON__FAMILY) return null;
    return (Family)eInternalContainer();
}
项目:emf-rest    文件:FamilyImpl.java   
/**
 * <!-- begin-user-doc -->
 * Z1
 * <!-- end-user-doc -->
 * @generated
 */ 
@XmlElementWrapper(name =  "parents")    
@XmlAnyElement(lax=true)
@XmlJavaTypeAdapter(value=ParentAdapter.class)

public EList<Parent> getParents() {
    if (parents == null) {
        parents = new EObjectContainmentWithInverseEList<Parent>(Parent.class, this, ExamplePackage.FAMILY__PARENTS, ExamplePackage.PARENT__FAMILY);
    }
    return parents;
}
项目:emf-rest    文件:FamilyImpl.java   
/**
 * <!-- begin-user-doc -->
 * Z1
 * <!-- end-user-doc -->
 * @generated
 */ 
@XmlElementWrapper(name =  "sons")   
@XmlAnyElement(lax=true)
@XmlJavaTypeAdapter(value=SonAdapter.class)

public EList<Son> getSons() {
    if (sons == null) {
        sons = new EObjectContainmentWithInverseEList<Son>(Son.class, this, ExamplePackage.FAMILY__SONS, ExamplePackage.SON__FAMILY);
    }
    return sons;
}
项目:emf-rest    文件:FamilyImpl.java   
/**
 * <!-- begin-user-doc -->
 * Z1
 * <!-- end-user-doc -->
 * @generated
 */ 
@XmlElementWrapper(name =  "daughters")  
@XmlAnyElement(lax=true)
@XmlJavaTypeAdapter(value=DaughterAdapter.class)

public EList<Daughter> getDaughters() {
    if (daughters == null) {
        daughters = new EObjectContainmentWithInverseEList<Daughter>(Daughter.class, this, ExamplePackage.FAMILY__DAUGHTERS, ExamplePackage.DAUGHTER__FAMILY);
    }
    return daughters;
}
项目:emf-rest    文件:FamilyImpl.java   
/**
 * <!-- begin-user-doc -->
 * Z1
 * <!-- end-user-doc -->
 * @generated
 */ 
@XmlElementWrapper(name =  "pets")   
@XmlAnyElement(lax=true)
@XmlJavaTypeAdapter(value=PetAdapter.class)

public EList<Pet> getPets() {
    if (pets == null) {
        pets = new EObjectContainmentEList<Pet>(Pet.class, this, ExamplePackage.FAMILY__PETS);
    }
    return pets;
}
项目:rexsl    文件:JaxbGroup.java   
/**
 * Get group of elements.
 * @return The collection
 */
@XmlAnyElement(lax = true)
@XmlMixed
@NotNull(message = "collection is never NULL")
public Collection<?> getGroup() {
    return Collections.unmodifiableCollection(this.group);
}