public ElementArrayLabel(Contact paramContact, ElementArray paramElementArray) { decorator = new Qualifier(paramContact); type = paramContact.getType(); entry = paramElementArray.entry(); name = paramElementArray.name(); label = paramElementArray; }
/** * Constructor for the <code>ElementArrayLabel</code> object. This creates a label object, which * can be used to convert an element node to an array of XML serializable objects. * * @param contact this is the contact that this label represents * @param label the annotation that contains the schema details */ public ElementArrayLabel(Contact contact, ElementArray label) { this.detail = new Introspector(contact, this); this.decorator = new Qualifier(contact); this.type = contact.getType(); this.entry = label.entry(); this.name = label.name(); this.label = label; }
public Object getEmpty(Context paramContext) { paramContext = new ArrayFactory(paramContext, new ClassType(type)); if (!label.empty()) { return paramContext.getInstance(); } return null; }
/** * This is used to provide a configured empty value used when the annotated value is null. This * ensures that XML can be created with required details regardless of whether values are null or * not. It also provides a means for sensible default values. * * @param context this is the context object for the serialization * @return this returns the string to use for default values */ public Object getEmpty(Context context) throws Exception { Type array = new ClassType(type); Factory factory = new ArrayFactory(context, array); if (!label.empty()) { return factory.getInstance(); } return null; }
public boolean isRequired() { return label.required(); }
public boolean isData() { return label.data(); }