Package org.glassfish.gmbal.typelib
Class TypeEvaluator
java.lang.Object
org.glassfish.gmbal.typelib.TypeEvaluator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Map
<Class, EvaluatedType> private static List
<EvaluatedType> private static Map
<TypeEvaluator.EvalMapKey, EvaluatedClassDeclaration> private static Map
<Class<?>, EvaluatedType> private static final String
For ORB compatibility with JDK11+ JDKs see https://github.com/eclipse-ee4j/orb-gmbal/issues/22 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static int
getDeclaredFields
(Class<?> cls) private static Method
getDeclaredMethod
(Class<?> cls, String name, Class<?>... sig) getDeclaredMethods
(Class<?> cls) private static EvaluatedClassDeclaration
static EvaluatedType
getEvaluatedType
(Class cls) Given any generic java type, evaluate all of its type bounds and return an evaluated type.private static EvaluatedType
getImmutableEvaluatedType
(Class<?> cls) Return the EvaluatedType corresponding to cls if cls represents an immutable type, otherwise return null.private static void
mapPut
(EvaluatedClassDeclaration ecd, Class cls) static void
setDebugLevel
(int level)
-
Field Details
-
ORG_GLASSFISH_GMBAL_NO_MULTIPLE_UPPER_BOUNDS_EXCEPTION
For ORB compatibility with JDK11+ JDKs see https://github.com/eclipse-ee4j/orb-gmbal/issues/22In 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
-
evalClassMap
-
emptyETList
-
classMap
-
-
Constructor Details
-
TypeEvaluator
private TypeEvaluator()
-
-
Method Details
-
mapPut
-
getImmutableEvaluatedType
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
-
getDeclaredMethods
-
getDeclaredFields
-
getDeclaredMethod
private static Method getDeclaredMethod(Class<?> cls, String name, Class<?>... sig) throws NoSuchMethodException, PrivilegedActionException -
evalClassMapSize
public static int evalClassMapSize() -
dumpEvalClassMap
public static void dumpEvalClassMap() -
getEvaluatedType
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
-