public class ReflectionStructObjectInspector extends SettableStructObjectInspector
| Modifier and Type | Class and Description |
|---|---|
static class |
ReflectionStructObjectInspector.MyField
MyField.
|
ObjectInspector.Category| Modifier and Type | Method and Description |
|---|---|
Object |
create()
Create a struct which is not null, but all its fields are null.
|
protected List<? extends ObjectInspector> |
extractFieldObjectInspectors(Class<?> clazz,
ObjectInspectorFactory.ObjectInspectorOptions options) |
List<? extends StructField> |
getAllStructFieldRefs()
Returns all the fields.
|
ObjectInspector.Category |
getCategory()
An ObjectInspector must inherit from one of the following interfaces if
getCategory() returns: PRIMITIVE: PrimitiveObjectInspector LIST:
ListObjectInspector MAP: MapObjectInspector STRUCT: StructObjectInspector.
|
Object |
getStructFieldData(Object data,
StructField fieldRef)
returns null for data = null.
|
StructField |
getStructFieldRef(String fieldName)
Look up a field.
|
List<Object> |
getStructFieldsDataAsList(Object data)
returns null for data = null.
|
String |
getTypeName()
Returns the name of the data type that is inspected by this
ObjectInspector.
|
protected void |
init(Type type,
Class<?> objectClass,
ObjectInspectorFactory.ObjectInspectorOptions options)
This method is only intended to be used by Utilities class in this package.
|
protected boolean |
isFullyInited(Set<Type> checkedTypes)
Check if this inspector and all its field inspectors are initialized.
|
Object |
setStructFieldData(Object struct,
StructField field,
Object fieldValue)
Modify the value of a field.
|
boolean |
shouldIgnoreField(String name) |
protected void |
verifyObjectClassType(Class<?> objectClass) |
isSettabletoStringpublic ObjectInspector.Category getCategory()
ObjectInspectorpublic String getTypeName()
ObjectInspectorprotected boolean isFullyInited(Set<Type> checkedTypes)
protected void init(Type type, Class<?> objectClass, ObjectInspectorFactory.ObjectInspectorOptions options)
public boolean shouldIgnoreField(String name)
public StructField getStructFieldRef(String fieldName)
StructObjectInspectorgetStructFieldRef in class StructObjectInspectorpublic List<? extends StructField> getAllStructFieldRefs()
StructObjectInspectorgetAllStructFieldRefs in class StructObjectInspectorpublic Object getStructFieldData(Object data, StructField fieldRef)
StructObjectInspectorgetStructFieldData in class StructObjectInspectorpublic List<Object> getStructFieldsDataAsList(Object data)
StructObjectInspectorgetStructFieldsDataAsList in class StructObjectInspectorpublic Object create()
SettableStructObjectInspectorcreate in class SettableStructObjectInspectorpublic Object setStructFieldData(Object struct, StructField field, Object fieldValue)
SettableStructObjectInspectorsetStructFieldData in class SettableStructObjectInspectorprotected List<? extends ObjectInspector> extractFieldObjectInspectors(Class<?> clazz, ObjectInspectorFactory.ObjectInspectorOptions options)
protected void verifyObjectClassType(Class<?> objectClass)
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.