Class FieldAccess.OfGenericField

    • Field Detail

      • targetType

        private final TypeDefinition targetType
        The resolved generic field type.
      • defined

        private final FieldAccess.Defined defined
        An accessor for the field in its defined shape.
    • Constructor Detail

      • OfGenericField

        protected OfGenericField​(TypeDefinition targetType,
                                 FieldAccess.Defined defined)
        Creates a new dispatcher for a generic field.
        Parameters:
        targetType - The resolved generic field type.
        defined - An accessor for the field in its defined shape.
    • Method Detail

      • of

        protected static FieldAccess.Defined of​(FieldDescription fieldDescription,
                                                FieldAccess.Defined fieldAccess)
        Creates a generic access dispatcher for a given field.
        Parameters:
        fieldDescription - The field that is being accessed.
        fieldAccess - A field accessor for the field in its defined shape.
        Returns:
        A field access dispatcher for the given field.
      • read

        public StackManipulation read()
        Creates a getter representation for a given field.
        Specified by:
        read in interface FieldAccess.Defined
        Returns:
        A stack manipulation representing the retrieval of a field value.
      • write

        public StackManipulation write()
        Creates a setter representation for a given field.
        Specified by:
        write in interface FieldAccess.Defined
        Returns:
        A stack manipulation representing the setting of a field value.