@XmlElementWrapper(name="comptesCommunaux") @XmlElements({@XmlElement(name="compteCommunal", type=CompteCommunal.class)}) /** * @param comptesCommunaux the comptesCommunaux to set */ public void setComptesCommunaux(List<CompteCommunal> comptesCommunaux) { this.comptesCommunaux = comptesCommunaux; }
@XmlElementWrapper(name="proprietes") @XmlElements({@XmlElement(name="propriete", type=ProprieteBatie.class)}) /** * @param proprietes */ public void setProprietes(List<ProprieteBatie> proprietes) { this.proprietes = proprietes; }
@XmlElementWrapper(name="parcelles") @XmlElements({@XmlElement(name="parcelle", type=Parcelle.class)}) /** * @param parcelleList the parcelleList to set */ public void setParcelleList(List<Parcelle> parcelleList) { this.parcelleList = parcelleList; }
static boolean supportsCriteriaValue(Class<? extends SingleValuedPredicate> simplePredicateClass, CriteriaValue<?> value) { if (simplePredicateClass == null) { throw new IllegalArgumentException("simplePredicateClass was null"); } if (value == null) { throw new IllegalArgumentException("valueClass was null"); } XmlElements elementsAnnotation = CriteriaSupportUtils.findXmlElementsAnnotation(simplePredicateClass); if (elementsAnnotation != null) { XmlElement[] elements = elementsAnnotation.value(); for (XmlElement element : elements) { if (value.getClass().equals(element.type())) { return true; } } } return false; }
@XmlElements({ @XmlElement(name="activity"), @XmlElement(name="activity-alias") }) public void setActivites(List<Activity> activites) { this.activites = activites; }
@XmlElementWrapper(name = "values") @XmlElements({ @XmlElement(name = "byte", type = Byte.class), @XmlElement(name = "double", type = Double.class), @XmlElement(name = "float", type = Float.class), @XmlElement(name = "short", type = Short.class), @XmlElement(name = "integer", type = Integer.class), @XmlElement(name = "long", type = Long.class), @XmlElement(name = "string", type = String.class) }) public List<Object> getValues() { return values; }
@XmlElements({ @XmlElement(name = "resource") }) @XmlElementWrapper(name = "resources") public final List<MCRIViewClientResource> getResources() { return resources.entries() .stream() .map(entry -> new MCRIViewClientResource(entry.getKey(), entry.getValue())) .collect(Collectors.toList()); }
@XmlElements({ @XmlElement(name = "property") }) @XmlElementWrapper(name = "properties") public final List<MCRIViewClientProperty> getProperties() { return properties.entrySet() .stream() .map(entry -> new MCRIViewClientProperty(entry.getKey(), entry.getValue())) .collect(Collectors.toList()); }
@XmlElementWrapper(name = "connections") @XmlElements({ @XmlElement(type = MutableSiblingConnection.class, name = "sibling-connection"), @XmlElement(type = MutableParentInToChildInConnection.class, name = "parent-to-child-connection"), @XmlElement(type = MutableChildOutToParentOutConnection.class, name = "child-to-parent-connection"), @XmlElement(type = MutableShortCircuitConnection.class, name = "short-circuit-connection") }) @Override public final List<MutableConnection<?>> getConnections() { return connections; }
@XmlElementWrapper(name = "targets") @XmlElements({ @XmlElement(type = JAXBAdapters.JAXBElementPatternTarget.class, name = "element-regex"), @XmlElement(type = JAXBAdapters.JAXBElementTarget.class, name = "element"), @XmlElement(type = JAXBAdapters.JAXBExecutionTracePatternTarget.class, name = "execution-trace-regex"), @XmlElement(type = JAXBAdapters.JAXBExecutionTraceTarget.class, name = "execution-trace") }) @Override public List<MutableOverrideTarget<?>> getTargets() { return overrideTargets; }
@JsonProperty( value = "gateways" ) @XmlElementWrapper( name = "gateways" ) @XmlElements( { @XmlElement( name = "bulksms", type = BulkSmsGatewayConfig.class ), @XmlElement( name = "clickatell", type = ClickatellGatewayConfig.class ), @XmlElement( name = "http", type = GenericHttpGatewayConfig.class ) }) public List<SmsGatewayConfig> getGateways() { return gateways; }
@XmlElementWrapper(name = "external-variables") @XmlElements({@XmlElement(name="property-list-variable", type=JaxbPropertyListVariable.class), @XmlElement(name="relative-date-variable", type=JaxbRelativeDateVariable.class), @XmlElement(name="property-variable", type=JaxbPropertyValueVariable.class), @XmlElement(name="fulltext-variable", type=JaxbFullTextVariable.class)}) @Override public List<ExternalVariable<?>> getExternalVariables() { return externalVariables; }
@XmlElementWrapper @XmlElements({@XmlElement(name="expression-set", type=JaxbExpressionSet.class), @XmlElement(name="fulltext", type=JaxbFullTextExpression.class), @XmlElement(name="property", type=JaxbPropertyExpression.class), @XmlElement(name="property-list", type=JaxbPropertyListExpression.class), @XmlElement(name="property-range", type=JaxbPropertyRangeExpression.class), @XmlElement(name="relative-date", type=JaxbRelativeDateExpression.class)}) public List<Expression> getExpressions() { return expressions; }
private void processElements(RoundEnvironment roundEnv, TypeElement classElement, XmlElements elements, VariableElement fieldElement, Set<EipOption> eipOptions, String prefix) { Elements elementUtils = processingEnv.getElementUtils(); String fieldName; fieldName = fieldElement.getSimpleName().toString(); if (elements != null) { String kind = "element"; String name = fieldName; name = prefix + name; TypeMirror fieldType = fieldElement.asType(); String fieldTypeName = fieldType.toString(); String defaultValue = findDefaultValue(fieldElement, fieldTypeName); String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, name, classElement, true); boolean required = true; required = findRequired(fieldElement, required); // gather oneOf of the elements Set<String> oneOfTypes = new TreeSet<String>(); for (XmlElement element : elements.value()) { String child = element.name(); oneOfTypes.add(child); } EipOption ep = new EipOption(name, kind, fieldTypeName, required, defaultValue, docComment, false, false, null, true, oneOfTypes); eipOptions.add(ep); } }
@XmlElementWrapper(name="proprietaires") @XmlElements({@XmlElement(name="proprietaire", type=Proprietaire.class)}) /** * @param proprietaires the proprietaires to set */ public void setProprietaires(List<Proprietaire> proprietaires) { this.proprietaires = proprietaires; }
@XmlElements({@XmlElement(name="proprietesBaties", type=ProprietesBaties.class, nillable = true)}) /** * @param proprieteBaties the proprieteBaties to set */ public void setProprietesBaties(ProprietesBaties proprieteBaties) { this.proprieteBaties = proprieteBaties; }
@XmlElements({@XmlElement(name="proprietesNonBaties", type=ProprietesNonBaties.class, nillable = true)}) /** * @param proprieteNonBaties the proprieteNonBaties to set */ public void setProprietesNonBaties(ProprietesNonBaties proprieteNonBaties) { this.proprieteNonBaties = proprieteNonBaties; }
@XmlElementWrapper(name="proprietes") @XmlElements({@XmlElement(name="propriete", type=ProprieteNonBatie.class)}) /** * @param proprietes */ public void setProprietes(List<ProprieteNonBatie> proprietes) { this.proprietes = proprietes; }
@XmlElementWrapper(name="exonerations") @XmlElements({@XmlElement(name="exoneration", type=Exoneration.class)}) /** * @param exonerations the exonerations to set */ public void setExonerations(List<Exoneration> exonerations) { this.exonerations = exonerations; }
@XmlElementWrapper(name = "proprietaires") @XmlElements({ @XmlElement(name = "Proprietaire", type = Proprietaire.class) }) /** * @param proprietaires */ public void setProprietaires(List<Proprietaire> proprietaires) { this.proprietaires = proprietaires; }
@XmlElements({ @XmlElement(name = "Propriete", type = ProprieteBatie.class) }) /** * @param proprieteDescription the proprieteDescription to set */ public void setProprieteDescription(ProprieteBatie proprieteDescription) { this.proprieteDescription = proprieteDescription; }
@XmlElementWrapper(name="proprietaires") @XmlElements({@XmlElement(name="proprietaire", type=Proprietaire.class)}) /** * @param proprietaires the proprietaires List to set */ public void setProprietaires(List<Proprietaire> proprietaires) { this.proprietaires = proprietaires; }
@XmlElementWrapper(name="proprieteBaties") @XmlElements({@XmlElement(name="proprieteBatie", type=ProprieteBatie.class)}) /** * @param proprieteBaties the proprieteBaties to set */ public void setProprieteBaties(List<ProprieteBatie> proprieteBaties) { this.proprieteBaties = proprieteBaties; }
@XmlElementWrapper(name="proprieteNonBaties") @XmlElements({@XmlElement(name="proprieteNonBatie", type=ProprieteNonBatie.class)}) /** * @param proprieteNonBaties the proprieteNonBaties to set */ public void setProprieteNonBaties(List<ProprieteNonBatie> proprieteNonBaties) { this.proprieteNonBaties = proprieteNonBaties; }
@XmlElementWrapper(name="lots") @XmlElements({@XmlElement(name="lot", type=Lot.class)}) /** * @param lots the lots to set */ public void setLots(List<Lot> lots) { this.lots = lots; }
@XmlElementWrapper(name = "lots") @XmlElements({ @XmlElement(name = "Lot", type = Lot.class) }) /** * @param lots */ public void setLots(List<Lot> lots) { this.lots = lots; }
@XmlElements( { @XmlElement( name="RampTest", type = RampTest.class ), @XmlElement( name="StressTest", type = StressTest.class), @XmlElement( name="TimeTest", type = TimeTest.class ) } ) public Test getTest() { return test; }
@XmlElementWrapper( name = "gateways" ) @XmlElements( { @XmlElement( name = "bulksms", type = BulkSmsGatewayConfig.class ), @XmlElement( name = "clickatell", type = ClickatellGatewayConfig.class ), @XmlElement( name = "http", type = GenericHttpGatewayConfig.class ), @XmlElement( name = "modem", type = ModemGatewayConfig.class ) } ) public List<SmsGatewayConfig> getGateways() { return gateways; }
@XmlElementWrapper @XmlElements({ @XmlElement(name = "sampleBean", type = SampleBean.class) }) /* * If SampleBean is generic, use this sintax * @XmlElements({ @XmlElement(name = "ledger", type = SampleBean.class), @XmlElement(name = "settlement", type = SettlementDTO.class), @XmlElement(name = "inventory", type = InventoryDTO.class), @XmlElement(name = "statement", type = ClientDocumentDTO.class) }) */ public List<SampleBean> getData() { return data; }
@XmlElements({ @XmlElement(name = "node", type = LSNode.class), @XmlElement(name = "output_template", type = LSOutputTemplate.class), @XmlElement(name = "engine_class", type = LSEngineClass.class), @XmlElement(name = "train_type", type = LSTrainType.class), @XmlElement(name = "line_class", type = LSLineClass.class), @XmlElement(name = "train_type_category", type = LSTrainTypeCategory.class) }) public Object getObject() { return object; }
@XmlElementWrapper @XmlElements({ @XmlElement(name = "node", type = LSTrainRoutePartNode.class), @XmlElement(name = "line", type = LSTrainRoutePartLine.class) }) public List<Object> getRoute() { return route; }
@Override @XmlElements({ @XmlElement(name = "simpleTriggerModel", type = ReportJobSimpleTriggerModel.class), @XmlElement(name = "calendarTriggerModel", type = ReportJobCalendarTriggerModel.class)}) public JobTrigger getTrigger() { JobTrigger model = super.getTrigger(); if (model == null) return null; if ((model instanceof ReportJobSimpleTriggerModel) || (model instanceof ReportJobCalendarTriggerModel)) return model; else throw new JSClientException("Please useReportJobTriggerModel instead of JobTrigger in ReportJobModel class."); }
@XmlElements(value = { @XmlElement(name = "provider", type = UniqueID.class), @XmlElement(name = "person", type = Person.class), }) public Object getContact() { if (contact != null) { return contact; } else { if (providerEntityID != null && !providerEntityID.isEmpty()) { return new UniqueID(providerEntityID); } else { return person; } } }
@XmlElementWrapper(name = "tasks", namespace = "urn:test") @XmlElements( { @XmlElement(name = "usertask", namespace = "urn:test", type = UserTask.class), @XmlElement(name = "autotask", namespace = "urn:test", type = AutoTask.class) }) public Collection<Node> getNodes() { return nodes; }
@XmlElementWrapper(name="PowerStatsList") @XmlElements({ @XmlElement(name="PowerStats", type=PowerStatistics.class) }) public List<PowerStatistics> getPowerStatistics() { return powerStatistics; }
@XmlElements({ @XmlElement(name="user", type=RESTInputUser.class), @XmlElement(name="userGroup", type=RESTInputGroup.class), @XmlElement(name="instance", type=RESTInputInstance.class), @XmlElement(name="rule", type=RESTInputRule.class) }) public AbstractRESTPayload getPayload() { return payload; }
/** * Parse the annotations on the field to see if there is an XmlElements * annotation on it. If so, we'll check this annotation to see if it * refers to any classes that are external from our code schema compile. * If we find any, then we'll add them to our visitor. * @param outline root of the generated code * @param field parses the xml annotations looking for an external class * @param directClasses set of direct classes to append to * @throws IllegalAccessException throw if there's an error introspecting the annotations */ private static void parseXmlAnnotations(Outline outline, FieldOutline field, Set<String> directClasses) throws IllegalAccessException { if (field instanceof UntypedListField) { JFieldVar jfv = (JFieldVar) FieldHack.listField.get(field); for(JAnnotationUse jau : jfv.annotations()) { JClass jc = jau.getAnnotationClass(); if (jc.fullName().equals(XmlElements.class.getName())) { JAnnotationArrayMember value = (JAnnotationArrayMember) jau.getAnnotationMembers().get("value"); for(JAnnotationUse anno : value.annotations()) { handleXmlElement(outline, directClasses, anno.getAnnotationMembers().get("type")); } } } } }