use of org.apache.tapestry5.commons.internal.services.StringLocation in project tapestry-5 by apache.
the class ComponentWorker method transformField.
private void transformField(PlasticClass transformation, MutableComponentModel model, PlasticField field) {
Component annotation = field.getAnnotation(Component.class);
field.claim(annotation);
String annotationId = annotation.id();
String fieldName = field.getName();
String id = InternalUtils.isNonBlank(annotationId) ? annotationId : InternalUtils.stripMemberName(fieldName);
String type = field.getTypeName();
Location location = new StringLocation(String.format("%s.%s", transformation.getClassName(), fieldName), 0);
MutableEmbeddedComponentModel embedded = model.addEmbeddedComponent(id, annotation.type(), type, annotation.inheritInformalParameters(), location);
addParameters(embedded, annotation.parameters());
updateModelWithPublishedParameters(embedded, annotation);
convertAccessToField(field, id);
addMixinClasses(field, embedded);
addMixinTypes(field, embedded);
}
Aggregations