public static void injectParameters(Object type, Properties parameters) { if ( ParameterizedType.class.isInstance( type ) ) { ( (ParameterizedType) type ).setParameterValues(parameters); } else if ( parameters!=null && !parameters.isEmpty() ) { throw new MappingException( "type is not parameterized: " + type.getClass().getName() ); } }
public static void injectParameters(Object type, Properties parameters) { if (type instanceof ParameterizedType) { ( (ParameterizedType) type ).setParameterValues(parameters); } else if ( parameters!=null && !parameters.isEmpty() ) { throw new MappingException( "type is not parameterized: " + type.getClass().getName() ); } }
public static void injectParameters(Object type, Properties parameters) { if ( ParameterizedType.class.isInstance( type ) ) { if ( parameters == null ) { ( (ParameterizedType) type ).setParameterValues( EMPTY_PROPERTIES ); } else { ( (ParameterizedType) type ).setParameterValues( parameters ); } } else if ( parameters != null && !parameters.isEmpty() ) { throw new MappingException( "type is not parameterized: " + type.getClass().getName() ); } }