/** * The type for an element holding child nodes.<br> * Created on: Jun 17, 2008<br> * * @author Martin Grotzke (martin.grotzke at freiheit.com) */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "foo", propOrder = {}) @XmlRootElement(name = "foo") public class XhtmlElementType { @XmlAnyElement protected List<Object> any; public List<Object> getChildNodes() { if (any == null) { any = new ArrayList<>(); } return this.any; } }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "classDoc", propOrder = {}) public class ClassDocType { @XmlAnyElement(lax = true) private List<Object> any;
@XmlRootElement(name="archive-tasks-command") @XmlAccessorType(XmlAccessType.NONE) public class ArchiveTasksCommand extends TaskCommand<Integer> { @XmlAnyElement private List<TaskSummary> tasks;
@XmlAccessorType(XmlAccessType.FIELD) public class AppWorkspace extends AppCommonAttributes @XmlElement(namespace = "http://www.w3.org/2005/Atom", required = true) protected String title; @XmlAnyElement(lax = true) protected List<Object> any;
@XmlAccessorType(XmlAccessType.FIELD) public static class Entry @XmlAnyElement Object value; @XmlAnyAttribute Map<QName, Object> attribute = new HashMap<QName, Object>();
/** * 封装Root Element 是 Collection的情况. */ public static class CollectionWrapper { @XmlAnyElement protected Collection<?> collection; } }
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")); } }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "classDoc", propOrder = {}) public class ClassDocType { @XmlAnyElement(lax = true) private List<Object> any;
/** * 封装Root Element 是 Collection的情况. */ public static class CollectionWrapper { @XmlAnyElement protected Collection<?> collection; } }
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")); } }
/** * The type for an element holding child nodes.<br> * Created on: Jun 17, 2008<br> * * @author Martin Grotzke (martin.grotzke at freiheit.com) */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "foo", propOrder = {}) @XmlRootElement(name = "foo") public class XhtmlElementType { @XmlAnyElement protected List<Object> any; public List<Object> getChildNodes() { if (any == null) { any = new ArrayList<>(); } return this.any; } }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "paramDoc", propOrder = { @XmlAnyElement(lax = true) private List<Object> any;
public AnyElement(MemberDeclaration delegate, TypeDefinition typeDef) { super(delegate); XmlAnyElement info = delegate.getAnnotation(XmlAnyElement.class); if (info == null) { throw new IllegalStateException("No @XmlAnyElement annotation."); } this.lax = info.lax(); ArrayList<ElementRef> elementRefs = new ArrayList<ElementRef>(); XmlElementRefs elementRefInfo = delegate.getAnnotation(XmlElementRefs.class); if (elementRefInfo != null && elementRefInfo.value() != null) { for (XmlElementRef elementRef : elementRefInfo.value()) { elementRefs.add(new ElementRef(delegate, typeDef, elementRef)); } } refs = Collections.<ElementRef>unmodifiableList(elementRefs); this.facets.addAll(Facet.gatherFacets(delegate)); this.facets.addAll(typeDef.getFacets()); }
/** * The type for an element holding child nodes.<br> * Created on: Jun 17, 2008<br> * * @author <a href="mailto:martin.grotzke@freiheit.com">Martin Grotzke</a> * @version $Id$ */ @XmlAccessorType( XmlAccessType.FIELD ) @XmlType( name = "foo", propOrder = { } ) @XmlRootElement( name = "foo" ) public class XhtmlElementType { @XmlAnyElement protected List<Object> any; public List<Object> getChildNodes() { if (any == null) { any = new ArrayList<Object>(); } return this.any; } }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "paramDoc", propOrder = { @XmlAnyElement(lax = true) private List<Object> any;
public AnyElement(javax.lang.model.element.Element delegate, TypeDefinition typeDef, EnunciateJaxbContext context) { super(delegate, context.getContext().getProcessingEnvironment()); XmlAnyElement info = delegate.getAnnotation(XmlAnyElement.class); if (info == null) { throw new EnunciateException("No @XmlAnyElement annotation."); } this.lax = info.lax(); ArrayList<ElementRef> elementRefs = new ArrayList<ElementRef>(); XmlElementRefs elementRefInfo = delegate.getAnnotation(XmlElementRefs.class); if (elementRefInfo != null && elementRefInfo.value() != null) { for (XmlElementRef elementRef : elementRefInfo.value()) { elementRefs.add(new ElementRef(delegate, typeDef, elementRef, context)); } } refs = Collections.unmodifiableList(elementRefs); this.facets.addAll(Facet.gatherFacets(delegate, context.getContext())); this.facets.addAll(typeDef.getFacets()); }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "any" }) public static class Section { @XmlAnyElement protected List<Element> any; @XmlAttribute(required = true) protected String name;
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "classDoc", propOrder = { @XmlAnyElement(lax = true) private List<Object> any;
public AnyElement(javax.lang.model.element.Element delegate, TypeDefinition typeDef, EnunciateJaxbContext context) { super(delegate, context.getContext().getProcessingEnvironment()); XmlAnyElement info = delegate.getAnnotation(XmlAnyElement.class); if (info == null) { throw new EnunciateException("No @XmlAnyElement annotation."); } this.lax = info.lax(); ArrayList<ElementRef> elementRefs = new ArrayList<ElementRef>(); XmlElementRefs elementRefInfo = delegate.getAnnotation(XmlElementRefs.class); if (elementRefInfo != null && elementRefInfo.value() != null) { for (XmlElementRef elementRef : elementRefInfo.value()) { elementRefs.add(new ElementRef(delegate, typeDef, elementRef, context)); } } refs = Collections.unmodifiableList(elementRefs); this.facets.addAll(Facet.gatherFacets(delegate, context.getContext())); this.facets.addAll(typeDef.getFacets()); }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "methodDoc", propOrder = { @XmlElement(required = false, nillable = false) protected String methodSignature; @XmlAnyElement(lax = true) private List<Object> any;