Interface FieldAccessor


  • public interface FieldAccessor
    Provides 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 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
      • 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 value
        value - 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