Class FieldAccessorFactory
- java.lang.Object
-
- 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FieldAccessorFactory.Presence
Constants for distinguishing whether this field must be present.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.
-
-
-
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 fieldname
- 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 fieldname
- ASN.1 name of the field, after any @rename adaptationpresence
- whether the field is mandatory or optional (null if in a CHOICE)
-
-