Class ParameterizedBuilderHelper
- java.lang.Object
-
- com.tangosol.coherence.config.builder.ParameterizedBuilderHelper
-
public class ParameterizedBuilderHelper extends Object
TheParameterizedBuilderHelper
defines helper methods forParameterizedBuilder
implementations.- Since:
- Coherence 12.1.2
- Author:
- bo 2011-09-28
-
-
Constructor Summary
Constructors Constructor Description ParameterizedBuilderHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Object
getAssignableValue(Class<?> clzRequiredType, Parameter parameter, ParameterResolver resolver, ClassLoader loader)
Obtains an assignment compatible value of the required type given an actualParameter
.static boolean
isAssignablePrimitive(Class<?> clzPrimitive, Class<?> clzWrapper)
Determines if a primitive type is assignable to a wrapper type.static boolean
realizes(ParameterizedBuilder<?> bldr, Class<?> clzClass, ParameterResolver resolver, ClassLoader loader)
Deprecated.
-
-
-
Method Detail
-
getAssignableValue
public static Object getAssignableValue(Class<?> clzRequiredType, Parameter parameter, ParameterResolver resolver, ClassLoader loader) throws ClassCastException
Obtains an assignment compatible value of the required type given an actualParameter
.This allows us to accept parameters and produce an
Object
value that may be assigned using Java reflection.- Parameters:
clzRequiredType
- the required type of valueparameter
- the actualParameter
from which to determine the valueresolver
- theParameterResolver
to resolveParameter
s used inParameter
sloader
- theClassLoader
to use for loading necessary classes (required)- Returns:
- an object that is assignable to the required type
- Throws:
ClassCastException
- when it's not possible to determine an assignable value
-
isAssignablePrimitive
public static boolean isAssignablePrimitive(Class<?> clzPrimitive, Class<?> clzWrapper)
Determines if a primitive type is assignable to a wrapper type.- Parameters:
clzPrimitive
- the primitive class typeclzWrapper
- the wrapper class type- Returns:
- true if primitive and wrapper are assignment compatible
-
realizes
@Deprecated public static boolean realizes(ParameterizedBuilder<?> bldr, Class<?> clzClass, ParameterResolver resolver, ClassLoader loader)
Deprecated.Note: no longer used internally. deprecated for external usages, will be removed in future.Determines if a
ParameterizedBuilder
will build a specifiedClass
of object.- Parameters:
bldr
- theParameterizedBuilder
clzClass
- theClass
of object expectedresolver
- aParameterResolver
to resolve parametersloader
- theClassLoader
to use if classes need to be loaded- Returns:
true
if theParameterizedBuilder
will build the specifiedClass
of object,false
otherwise
-
-