Class FieldAccessorFactory


  • public class FieldAccessorFactory
    extends Object
    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

      • forField

        public static FieldAccessor forField​(Class<? extends AbstractFieldsObject> clazz,
                                             String name)
        Creates a new FieldAccessor for a field that has the given ASN.1 name, and is in the CHOICE type with the given class.
        Parameters:
        clazz - the Class that defines methods on the field
        name - ASN.1 name of the field, after any @rename adaptation
      • forField

        public static FieldAccessor forField​(Class<? extends AbstractFieldsObject> clazz,
                                             String name,
                                             FieldAccessorFactory.Presence presence)
        Creates a new FieldAccessor for a field that has the given ASN.1 name, is in the type with the given class, and is either mandatory or optional.
        Parameters:
        clazz - the Class that defines methods on the field
        name - ASN.1 name of the field, after any @rename adaptation
        presence - whether the field is mandatory or optional (null if in a CHOICE)