public static interface Type.EffectiveRecord extends Type
Type.Array, Type.EffectiveArray, Type.EffectiveRecord, Type.EffectiveReference, Type.Function, Type.FunctionOrMethod, Type.Impl, Type.Intersection, Type.Leaf, Type.Method, Type.Negation, Type.Nominal, Type.Primitive, Type.Property, Type.Record, Type.Reference, Type.Union| Modifier and Type | Method and Description |
|---|---|
int |
getFieldIndex(String field)
Determine the index of a given field in this effective record.
|
String[] |
getFieldNames()
Get the array of fields used in this type.
|
Type |
getReadableFieldType(String field)
Get the element type which could be read from this array.
|
Type |
getWriteableFieldType(String field)
Get the element type which could be written to this array.
|
boolean |
hasField(String field)
Check whether a given field is present in this effective record or
not.
|
int |
size()
Return the number of fields in this type
|
Type.EffectiveRecord |
update(String field,
Type type)
Get an updated version of this record type after a given field has
been assigned a given type.
|
Array, fromString, Function, Intersection, Method, Method, Method, Negation, Nominal, Property, Record, Record, Reference, toImplArrays, toImplOrVoid, toImplRecords, Unionint size()
boolean hasField(String field)
field - int getFieldIndex(String field)
field - String[] getFieldNames()
Type getReadableFieldType(String field)
Type getWriteableFieldType(String field)
Type.EffectiveRecord update(String field, Type type)
field - The field name being assigned. This must be an explicit
field declared in this type.type - The type of the value being assigned to the given field.Copyright © 2017. All rights reserved.