Class PrimitiveAnalysis
- java.lang.Object
-
- com.ensoftcorp.open.java.commons.analysis.PrimitiveAnalysis
-
public class PrimitiveAnalysis extends java.lang.Object
Some utilities for dealing with autoboxing and unboxing Reference: https://docs.oracle.com/javase/tutorial/java/data/autoboxing.html- Author:
- Ben Holland
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.ensoftcorp.atlas.core.db.graph.Node
autobox(com.ensoftcorp.atlas.core.db.graph.Node primitiveType)
Converts a primitive type to the boxed object equivalentstatic boolean
isBoxablePrimitiveType(com.ensoftcorp.atlas.core.db.graph.Node type)
Returns true if the given type is a primitive or primitive object typestatic com.ensoftcorp.atlas.core.db.graph.Node
unbox(com.ensoftcorp.atlas.core.db.graph.Node wrapperType)
Converts a primitive wrapper object type to the unboxed primitive equivalent
-
-
-
Method Detail
-
isBoxablePrimitiveType
public static boolean isBoxablePrimitiveType(com.ensoftcorp.atlas.core.db.graph.Node type)
Returns true if the given type is a primitive or primitive object type- Parameters:
primitiveType
-- Returns:
-
autobox
public static com.ensoftcorp.atlas.core.db.graph.Node autobox(com.ensoftcorp.atlas.core.db.graph.Node primitiveType)
Converts a primitive type to the boxed object equivalent- Parameters:
primitiveType
-- Returns:
-
unbox
public static com.ensoftcorp.atlas.core.db.graph.Node unbox(com.ensoftcorp.atlas.core.db.graph.Node wrapperType)
Converts a primitive wrapper object type to the unboxed primitive equivalent- Parameters:
primitiveType
-- Returns:
-
-