public final class TypeInfoUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TypeInfoUtils.PrimitiveParts |
Modifier and Type | Method and Description |
---|---|
static boolean |
doPrimitiveCategoriesMatch(TypeInfo ti1,
TypeInfo ti2)
returns true if both TypeInfos are of primitive type, and the primitive category matches.
|
static java.lang.reflect.Type |
getArrayElementType(java.lang.reflect.Type t)
Returns the array element type, if the Type is an array (Object[]), or
GenericArrayType (Map
|
static java.lang.String |
getBaseName(java.lang.String typeName) |
static int |
getCharacterLengthForType(PrimitiveTypeInfo typeInfo)
Return the character length of the type
|
static java.util.List<TypeInfo> |
getParameterTypeInfos(java.lang.reflect.Method m,
int size)
Get the parameter TypeInfo for a method.
|
static ObjectInspector |
getStandardJavaObjectInspectorFromTypeInfo(TypeInfo typeInfo)
Returns the standard object inspector that can be used to translate an
object of that typeInfo to a standard object type.
|
static ObjectInspector |
getStandardWritableObjectInspectorFromTypeInfo(TypeInfo typeInfo)
Returns the standard object inspector that can be used to translate an
object of that typeInfo to a standard object type.
|
static TypeInfo |
getTypeInfoFromObjectInspector(ObjectInspector oi)
Get the TypeInfo object from the ObjectInspector object by recursively
going into the ObjectInspector structure.
|
static TypeInfo |
getTypeInfoFromTypeString(java.lang.String typeString) |
static java.util.ArrayList<TypeInfo> |
getTypeInfosFromTypeString(java.lang.String typeString) |
static boolean |
hasParameters(java.lang.String typeName) |
static boolean |
isConversionRequiredForComparison(TypeInfo typeA,
TypeInfo typeB)
Given two types, determine whether conversion needs to occur to compare the two types.
|
static TypeInfoUtils.PrimitiveParts |
parsePrimitiveParts(java.lang.String typeInfoString)
Make some of the TypeInfo parsing available as a utility.
|
public static java.lang.reflect.Type getArrayElementType(java.lang.reflect.Type t)
public static java.util.List<TypeInfo> getParameterTypeInfos(java.lang.reflect.Method m, int size)
size
- In case the last parameter of Method is an array, we will try to
return a Listpublic static boolean hasParameters(java.lang.String typeName)
public static java.lang.String getBaseName(java.lang.String typeName)
public static boolean doPrimitiveCategoriesMatch(TypeInfo ti1, TypeInfo ti2)
ti1
- ti2
- public static TypeInfoUtils.PrimitiveParts parsePrimitiveParts(java.lang.String typeInfoString)
public static ObjectInspector getStandardWritableObjectInspectorFromTypeInfo(TypeInfo typeInfo)
public static ObjectInspector getStandardJavaObjectInspectorFromTypeInfo(TypeInfo typeInfo)
public static TypeInfo getTypeInfoFromObjectInspector(ObjectInspector oi)
public static java.util.ArrayList<TypeInfo> getTypeInfosFromTypeString(java.lang.String typeString)
public static TypeInfo getTypeInfoFromTypeString(java.lang.String typeString)
public static boolean isConversionRequiredForComparison(TypeInfo typeA, TypeInfo typeB)
typeA
- typeB
- public static int getCharacterLengthForType(PrimitiveTypeInfo typeInfo)
typeInfo
- Copyright © 2012 The Apache Software Foundation