Class ParameterizedBuilderHelper

java.lang.Object
com.tangosol.coherence.config.builder.ParameterizedBuilderHelper

public class ParameterizedBuilderHelper extends Object
The ParameterizedBuilderHelper defines helper methods for ParameterizedBuilder implementations.
Since:
Coherence 12.1.2
Author:
bo 2011-09-28
  • Constructor Details

    • ParameterizedBuilderHelper

      public ParameterizedBuilderHelper()
  • Method Details

    • 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 actual Parameter.

      This allows us to accept parameters and produce an Object value that may be assigned using Java reflection.

      Parameters:
      clzRequiredType - the required type of value
      parameter - the actual Parameter from which to determine the value
      resolver - the ParameterResolver to resolve Parameters used in Parameters
      loader - the ClassLoader 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 type
      clzWrapper - 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 specified Class of object.

      Parameters:
      bldr - the ParameterizedBuilder
      clzClass - the Class of object expected
      resolver - a ParameterResolver to resolve parameters
      loader - the ClassLoader to use if classes need to be loaded
      Returns:
      true if the ParameterizedBuilder will build the specified Class of object, false otherwise