Source:
private AnnotationMetaAttribute createMetaCollectionAttribute(DeclaredType declaredType, Element element, String fqNameOfReturnType, String collection, String targetEntity) { if ( TypeUtils.containsAnnotation( element, Constants.ELEMENT_COLLECTION ) ) { String explicitTargetEntity = getTargetEntity( element.getAnnotationMirrors() ); TypeMirror collectionElementType = TypeUtils.getCollectionElementType( declaredType, fqNameOfReturnType, explicitTargetEntity, context ); final TypeElement collectionElement = (TypeElement) context.getTypeUtils() .asElement( collectionElementType ); AccessTypeInformation accessTypeInfo = context.getAccessTypeInfo( collectionElementType.toString() ); if ( accessTypeInfo == null ) { AccessType explicitAccessType = null; if ( collectionElement != null ) { explicitAccessType = TypeUtils.determineAnnotationSpecifiedAccessType( collectionElement ); } accessTypeInfo = new AccessTypeInformation( collectionElementType.toString(), explicitAccessType, entity.getEntityAccessTypeInfo().getAccessType() ); context.addAccessTypeInformation( collectionElementType.toString(), accessTypeInfo ); } else { accessTypeInfo.setDefaultAccessType( entity.getEntityAccessTypeInfo().getAccessType() ); } } if (( TypeUtils.containsAnnotation( element, Constants.CONVERT ) || TypeUtils.containsAnnotation( element, Constants.HIBERNATE_TYPE ) ) && !isCollectionAssociation( element ) ) { return new AnnotationMetaSingleAttribute( entity, element, TypeUtils.toTypeString( declaredType ) ); } if ( collection.equals( Constants.MAP_ATTRIBUTE ) ) { return createAnnotationMetaAttributeForMap( declaredType, element, collection, targetEntity ); } return new AnnotationMetaCollection( entity, element, collection, getElementType( declaredType, targetEntity ) ); }

Target:
private AnnotationMetaAttribute createMetaCollectionAttribute(DeclaredType declaredType, Element element, String fqNameOfReturnType, String collection, String targetEntity) { if ( TypeUtils.containsAnnotation( element, Constants.ELEMENT_COLLECTION ) ) { String explicitTargetEntity = getTargetEntity( element.getAnnotationMirrors() ); TypeMirror collectionElementType = TypeUtils.getCollectionElementType( declaredType, fqNameOfReturnType, explicitTargetEntity, context ); final TypeElement collectionElement = (TypeElement) context.getTypeUtils() .asElement( collectionElementType ); AccessTypeInformation accessTypeInfo = context.getAccessTypeInfo( collectionElementType.toString() ); if ( accessTypeInfo == null ) { AccessType explicitAccessType = null; if ( collectionElement != null ) { explicitAccessType = TypeUtils.determineAnnotationSpecifiedAccessType( collectionElement ); } accessTypeInfo = new AccessTypeInformation( collectionElementType.toString(), explicitAccessType, entity.getEntityAccessTypeInfo().getAccessType() ); context.addAccessTypeInformation( collectionElementType.toString(), accessTypeInfo ); } else { accessTypeInfo.setDefaultAccessType( entity.getEntityAccessTypeInfo().getAccessType() ); } } if ( TypeUtils.containsAnnotation( element, Constants.CONVERT, Constants.HIBERNATE_TYPE ) && !TypeUtils.containsAnnotation( element, Constants.ONE_TO_MANY, Constants.MANY_TO_MANY, Constants.ELEMENT_COLLECTION ) ) { return new AnnotationMetaSingleAttribute( entity, element, TypeUtils.toTypeString( declaredType ) ); } if ( collection.equals( Constants.MAP_ATTRIBUTE ) ) { return createAnnotationMetaAttributeForMap( declaredType, element, collection, targetEntity ); } return new AnnotationMetaCollection( entity, element, collection, getElementType( declaredType, targetEntity ) ); }