/** * Generates a property descriptor of type {@link PropertyType#String} */ private void generateStringPropertyDescriptor(final ClassAnnotation cad, final ClassDescription classDescription, final boolean metatype, String annotationName, String propertyDescriptorName) { final String[] values = (String[]) cad.getValue(annotationName); if (values == null) { return; } final PropertyDescription pd = new PropertyDescription(cad); pd.setName(propertyDescriptorName); pd.setMultiValue(values); pd.setType(PropertyType.String); if (metatype) { pd.setPrivate(true); } classDescription.add(pd); }
describedClass.add(prop);
classDescription.add(cd); final ServiceDescription sd = new ServiceDescription(cad); sd.addInterface("javax.servlet.Filter"); classDescription.add(sd); pd.setPrivate(true); classDescription.add(pd); pdPattern.setPrivate(true); classDescription.add(pdPattern); pd2.setPrivate(true); classDescription.add(pd2);
ref.setUpdated(ad.getStringValue("updated", null)); describedClass.add(ref);
public ClassDescription clone() { final ClassDescription cd = new ClassDescription(this.describedClass, this.source); for(final AbstractDescription ad : this.descriptions) { cd.add(ad.clone()); } return cd; } }
this.currentClass.add(this.currentComponent); this.components.add(this.currentClass);
describedClass.add(ref);
/** Generates a property descriptor of type {@link PropertyType} */ private void generatePropertyDescriptor(final ClassAnnotation cad, final ClassDescription classDescription, final boolean metatype, final String propertyName, final String propertyDescriptorName, PropertyType propertyType, String label, String description, boolean isArray) { final PropertyDescription pd = new PropertyDescription(cad); pd.setName(propertyDescriptorName); pd.setLabel(label); pd.setDescription(description); pd.setType(propertyType); if(isArray) { final String[] values = (String[]) cad.getValue(propertyName); pd.setMultiValue(values); pd.setUnbounded(PropertyUnbounded.ARRAY); pd.setCardinality(Integer.MAX_VALUE); } else { final Object propertyVal = cad.getValue(propertyName); String pdValue = (propertyVal instanceof String) ? (String) propertyVal : propertyVal!=null ? propertyVal.toString() : null; pd.setValue(pdValue); pd.setUnbounded(PropertyUnbounded.DEFAULT); } if (!metatype) { pd.setPrivate(true); } classDescription.add(pd); }