Class TypeEvaluator

java.lang.Object
org.glassfish.gmbal.typelib.TypeEvaluator

public class TypeEvaluator extends Object
  • Field Details

    • ORG_GLASSFISH_GMBAL_NO_MULTIPLE_UPPER_BOUNDS_EXCEPTION

      private static final String ORG_GLASSFISH_GMBAL_NO_MULTIPLE_UPPER_BOUNDS_EXCEPTION
      For ORB compatibility with JDK11+ JDKs see https://github.com/eclipse-ee4j/orb-gmbal/issues/22

      In short, the ORB references com.sun.corba.ee.spi.orb.ORB, which references com.sun.corba.ee.impl.corba.TypeCodeFactory which eventually references com.sun.corba.ee.spi.legacy.connection.Connection.getSocket and java.net.Socket.checkPermission(java.net.SocketImpl).

      Now SocketImpl contains a method "<S extends SocketImpl invalid input: '&' PlatformSocketImpl> S createPlatformSocketImpl", which causes the ORB to crash completely. Setting a system property with this string ignores the fact GMBAL doesn't support multiple upper bounds.

      See Also:
    • immutableTypes

      private static Map<Class<?>,EvaluatedType> immutableTypes
    • evalClassMap

    • emptyETList

      private static List<EvaluatedType> emptyETList
    • classMap

      private static Map<Class,EvaluatedType> classMap
  • Constructor Details

    • TypeEvaluator

      private TypeEvaluator()
  • Method Details

    • mapPut

      private static void mapPut(EvaluatedClassDeclaration ecd, Class cls)
    • getImmutableEvaluatedType

      private static EvaluatedType getImmutableEvaluatedType(Class<?> cls)
      Return the EvaluatedType corresponding to cls if cls represents an immutable type, otherwise return null.
      Parameters:
      cls -
      Returns:
      an EvaluatedType, if cls is on the immutable list; otherwise null.
    • setDebugLevel

      public static void setDebugLevel(int level)
    • getECD

      private static EvaluatedClassDeclaration getECD(Class cls)
    • getDeclaredMethods

      private static List<Method> getDeclaredMethods(Class<?> cls)
    • getDeclaredFields

      private static List<Field> getDeclaredFields(Class<?> cls)
    • getDeclaredMethod

      private static Method getDeclaredMethod(Class<?> cls, String name, Class<?>... sig) throws NoSuchMethodException, PrivilegedActionException
      Throws:
      NoSuchMethodException
      PrivilegedActionException
    • evalClassMapSize

      public static int evalClassMapSize()
    • dumpEvalClassMap

      public static void dumpEvalClassMap()
    • getEvaluatedType

      public static EvaluatedType getEvaluatedType(Class cls)
      Given any generic java type, evaluate all of its type bounds and return an evaluated type.
      Parameters:
      cls - The java type to evaluate
      Returns:
      The evaluated type