private static ConstructorResult buildConstructorResult(Element constructorResultElement, XMLContext.Default defaults) { AnnotationDescriptor constructorResultDescriptor = new AnnotationDescriptor( ConstructorResult.class ); final Class entityClass = resolveClassReference( constructorResultElement.attributeValue( "target-class" ), defaults ); constructorResultDescriptor.setValue( "targetClass", entityClass ); List<ColumnResult> columnResultAnnotations = new ArrayList<ColumnResult>(); for ( Element columnResultElement : (List<Element>) constructorResultElement.elements( "column" ) ) { columnResultAnnotations.add( buildColumnResult( columnResultElement, defaults ) ); } constructorResultDescriptor.setValue( "columns", columnResultAnnotations.toArray( new ColumnResult[ columnResultAnnotations.size() ] ) ); return AnnotationFactory.create( constructorResultDescriptor ); }