Class ReflectionUtils

java.lang.Object
com.sap.cds.services.impl.utils.ReflectionUtils

public class ReflectionUtils extends Object
  • Method Details

    • isParameterizedType

      public static boolean isParameterizedType(Type type)
      Returns true if the the type is a ParameterizedType, using the upper bound in case of a WildcardType
      Parameters:
      type - the type to check
      Returns:
      true, if the type is a ParameterizedType
    • getParameterizedType

      public static ParameterizedType getParameterizedType(Type type)
      Returns the type as ParameterizedType, using the upper bound in case of a WildcardType
      Parameters:
      type - the type to cast
      Returns:
      the casted type
    • getClassForType

      public static Class<?> getClassForType(Type type) throws ClassNotFoundException
      Returns the class of a type, using the upper bound in case of a WildcardType
      Parameters:
      type - the type to resolve the class for
      Returns:
      the class of the type
      Throws:
      ClassNotFoundException - in case the class is not available