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(Class<?> objectClass,
ObjectInspectorFactory.ObjectInspectorOptions options)
This method is only intended to be used by Utilities class in this package.
|
Object |
setStructFieldData(Object struct,
StructField field,
Object fieldValue)
Modify the value of a field.
|
boolean |
shouldIgnoreField(String name) |
protected void |
verifyObjectClassType(Class<?> objectClass) |
isSettable
toString
public ObjectInspector.Category getCategory()
ObjectInspector
public String getTypeName()
ObjectInspector
protected void init(Class<?> objectClass, ObjectInspectorFactory.ObjectInspectorOptions options)
public boolean shouldIgnoreField(String name)
public StructField getStructFieldRef(String fieldName)
StructObjectInspector
getStructFieldRef
in class StructObjectInspector
public List<? extends StructField> getAllStructFieldRefs()
StructObjectInspector
getAllStructFieldRefs
in class StructObjectInspector
public Object getStructFieldData(Object data, StructField fieldRef)
StructObjectInspector
getStructFieldData
in class StructObjectInspector
public List<Object> getStructFieldsDataAsList(Object data)
StructObjectInspector
getStructFieldsDataAsList
in class StructObjectInspector
public Object create()
SettableStructObjectInspector
create
in class SettableStructObjectInspector
public Object setStructFieldData(Object struct, StructField field, Object fieldValue)
SettableStructObjectInspector
setStructFieldData
in class SettableStructObjectInspector
protected List<? extends ObjectInspector> extractFieldObjectInspectors(Class<?> clazz, ObjectInspectorFactory.ObjectInspectorOptions options)
protected void verifyObjectClassType(Class<?> objectClass)
Copyright © 2017 The Apache Software Foundation. All rights reserved.