private Constraint getObject ( final MathRandom random , final Element element , final Constructor < ? extends Constraint > constructor ) throws IllegalArgumentException , InstantiationException , IllegalAccessException , InvocationTargetException { LOG . debug ( "Creating constraint: " + element . getAttributes ( ) ) ; Constraint instance = constructor . newInstance ( new Object [ ] { random , element , generator } ) ; injector . injectMembers ( instance ) ; return instance ; }
Generates a new constraint instance using the given constructor the element and the generateor callback as parameters .