Package de.espirit.common.text
Class ValueOfContractor.Invoke
java.lang.Object
de.espirit.common.text.ValueOfContractor.Invoke
- Enclosing interface:
- ValueOfContractor
Utility class to provide reflective mechanism to access the contracted method.
- Since:
- 4.0.54
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Invoke
public Invoke()
-
-
Method Details
-
valueOf
public static <T> T valueOf(Class<T> clazz, Object value) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException Provides the fitting value from a contracting class based on the given value.- Parameters:
clazz
- The contracting class.value
- The textual value to be fetched.- Returns:
- The typed value.
- Throws:
SecurityException
- if access to the method was denied.NoSuchMethodException
- if the contractor does not fulfill the contract by declaring the required method.IllegalArgumentException
- if the specified method does not fit to the contract.IllegalAccessException
- if the underlying method is not accessible.InvocationTargetException
- if the method invocation causes an exception.- Since:
- 4.0.54
-