Interface FieldAccessor
-
public interface FieldAccessorProvides reflective access to a particular field of a SEQUENCE or CHOICE type. This is intended to support operations on arbitrary types; if it is known that a value is of a particular type, then it is faster to access that value's fields directly rather than via its FieldAcessors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectget(AbstractFieldsObject object)Calls a getter on this field in the given object.Class<?>getEnclosingClass()Gets the enclosing class of this field.StringgetName()Gets the ASN.1 name of this field, after application of any @rename adaptation.Parser<?>getParser()Gets the parser for values of this field.FieldAccessorFactory.PresencegetPresence()Gets whether this field is mandatory or optional.Class<?>getType()Gets the type of this field.booleanhas(AbstractFieldsObject object)Calls a has or isChosen method on this field in the given object.voidset(AbstractFieldsObject object, Object value)Calls a setter on this field in the given object.
-
-
-
Method Detail
-
getName
String getName()
Gets the ASN.1 name of this field, after application of any @rename adaptation.- Returns:
- String naming field
-
getType
Class<?> getType()
Gets the type of this field.- Returns:
- Class
-
getPresence
FieldAccessorFactory.Presence getPresence()
Gets whether this field is mandatory or optional.- Returns:
- Presence
-
getEnclosingClass
Class<?> getEnclosingClass()
Gets the enclosing class of this field.- Returns:
- Class
-
get
Object get(AbstractFieldsObject object)
Calls a getter on this field in the given object.- Parameters:
object- the object from which to get this field's value- Returns:
- value of field
-
set
void set(AbstractFieldsObject object, Object value)
Calls a setter on this field in the given object.- Parameters:
object- the object in which to set this field's valuevalue- new value for the object's field
-
has
boolean has(AbstractFieldsObject object)
Calls a has or isChosen method on this field in the given object.- Parameters:
object- the object in which to test this field's presence- Returns:
- boolean
-
getParser
Parser<?> getParser()
Gets the parser for values of this field.- Returns:
- Parser
-
-