public static FieldMapping getFieldMapping ( IDataType type ) { switch ( type . getTypeCategory ( ) ) { case CLASS : case TRAIT : return ( ( HierarchicalType ) type ) . fieldMapping ( ) ; case STRUCT : return ( ( StructType ) type ) . fieldMapping ( ) ; default : throw new IllegalArgumentException ( "Type " + type + " doesn't have any fields!" ) ; } }
Get the field mappings for the specified data type . Field mappings are only relevant for CLASS TRAIT and STRUCT types .