@SuppressWarnings("WeakerAccess") public AbstractConverterDescriptor( Class<? extends AttributeConverter> converterClass, Boolean forceAutoApply, ClassmateContext classmateContext) { this.converterClass = converterClass; final ResolvedType converterType = classmateContext.getTypeResolver().resolve( converterClass ); final List<ResolvedType> converterParamTypes = converterType.typeParametersFor( AttributeConverter.class ); if ( converterParamTypes == null ) { throw new AnnotationException( "Could not extract type parameter information from AttributeConverter implementation [" + converterClass.getName() + "]" ); } else if ( converterParamTypes.size() != 2 ) { throw new AnnotationException( "Unexpected type parameter information for AttributeConverter implementation [" + converterClass.getName() + "]; expected 2 parameter types, but found " + converterParamTypes.size() ); } this.domainType = converterParamTypes.get( 0 ); this.jdbcType = converterParamTypes.get( 1 ); this.autoApplicableDescriptor = resolveAutoApplicableDescriptor( converterClass, forceAutoApply ); }
final ReflectionManager reflectionManager = buildingContext.getBootstrapContext().getReflectionManager(); final ResolvedType declaringClassType = classmateContext.getTypeResolver().resolve( reflectionManager.toClass( xProperty.getDeclaringClass() ) );
@SuppressWarnings("WeakerAccess") public AbstractConverterDescriptor( Class<? extends AttributeConverter> converterClass, Boolean forceAutoApply, ClassmateContext classmateContext) { this.converterClass = converterClass; final ResolvedType converterType = classmateContext.getTypeResolver().resolve( converterClass ); final List<ResolvedType> converterParamTypes = converterType.typeParametersFor( AttributeConverter.class ); if ( converterParamTypes == null ) { throw new AnnotationException( "Could not extract type parameter information from AttributeConverter implementation [" + converterClass.getName() + "]" ); } else if ( converterParamTypes.size() != 2 ) { throw new AnnotationException( "Unexpected type parameter information for AttributeConverter implementation [" + converterClass.getName() + "]; expected 2 parameter types, but found " + converterParamTypes.size() ); } this.domainType = converterParamTypes.get( 0 ); this.jdbcType = converterParamTypes.get( 1 ); this.autoApplicableDescriptor = resolveAutoApplicableDescriptor( converterClass, forceAutoApply ); }
final ReflectionManager reflectionManager = buildingContext.getBootstrapContext().getReflectionManager(); final ResolvedType declaringClassType = classmateContext.getTypeResolver().resolve( reflectionManager.toClass( xProperty.getDeclaringClass() ) );