Class AbstractPVField

    • Field Detail

      • convert

        protected static final Convert convert
        Convenience method for derived classes that perform conversions.
    • Constructor Detail

      • AbstractPVField

        protected AbstractPVField​(Field field)
        Constructor that must be called by derived classes.
        Parameters:
        field - The introspection interface.
        Throws:
        IllegalArgumentException - if field is null;
    • Method Detail

      • changeField

        protected void changeField​(Field field)
      • getFieldName

        public String getFieldName()
        Description copied from interface: PVField
        Get the fieldName for this field.
        Specified by:
        getFieldName in interface PVField
        Returns:
        the name or the empty string if top-level field.
      • getFullName

        public String getFullName()
        Description copied from interface: PVField
        Fully expand the name of this field using the names of its parent fields with a period '.' separating each name.
        Specified by:
        getFullName in interface PVField
        Returns:
        the full name or the empty string if top-level field
      • postPut

        public void postPut()
        Description copied from interface: PVField
        postPut - called when the field is updated by the implementation.
        Specified by:
        postPut in interface PVField
      • setPostHandler

        public void setPostHandler​(PostHandler postHandler)
        Description copied from interface: PVField
        Set the handler for postPut. At most one handler can be set.
        Specified by:
        setPostHandler in interface PVField
        Parameters:
        postHandler - the handler
      • getFieldOffset

        public int getFieldOffset()
        Description copied from interface: PVField
        Get offset of the PVField field within top level structure. Every field within the PVStructure has a unique offset. The top level structure has an offset of 0. The first field within the structure has offset equal to 1. The other offsets are determined by recursively traversing each structure of the tree.
        Specified by:
        getFieldOffset in interface PVField
        Returns:
        the offset
      • getNextFieldOffset

        public int getNextFieldOffset()
        Description copied from interface: PVField
        Get the next offset. If the field is a scalar or array field then this is just offset + 1. If the field is a structure it is the offset of the next field after this structure. Thus (nextOffset - offset) is always equal to the number of fields within the field.
        Specified by:
        getNextFieldOffset in interface PVField
        Returns:
        the offset.
      • getNumberFields

        public int getNumberFields()
        Description copied from interface: PVField
        Get the total number of fields in this field. This is equal to nextFieldOffset - fieldOffset.
        Specified by:
        getNumberFields in interface PVField
        Returns:
        the number of fields
      • isImmutable

        public boolean isImmutable()
        Description copied from interface: PVField
        Is the field immutable - that is, does it not allow changes?
        Specified by:
        isImmutable in interface PVField
        Returns:
        (false,true) if it (is not, is) immutable
      • setImmutable

        public void setImmutable()
        Description copied from interface: PVField
        Set the field to be immutable - that is, it can no longer be modified. This is permanent. Once done the field cannot be made mutable.
        Specified by:
        setImmutable in interface PVField
      • getField

        public Field getField()
        Description copied from interface: PVField
        Get the Field that describes the field.
        Specified by:
        getField in interface PVField
        Returns:
        the Field, which is the reflection interface
      • getParent

        public PVStructure getParent()
        Description copied from interface: PVField
        Get the parent of this field.
        Specified by:
        getParent in interface PVField
        Returns:
        the parent interface or null if top-level
      • toString

        public void toString​(StringBuilder buf)
        Description copied from interface: PVField
        Convert the PVField to a string.
        Specified by:
        toString in interface PVField
        Parameters:
        buf - the buffer for the result
      • toString

        public void toString​(StringBuilder buf,
                             int indentLevel)
        Description copied from interface: PVField
        Convert the PVField to a string, indenting each line.
        Specified by:
        toString in interface PVField
        Parameters:
        buf - the buffer for the result
        indentLevel - the indentation level
      • toString

        public String toString()
        Description copied from interface: PVField
        Implement standard toString().
        Specified by:
        toString in interface PVField
        Overrides:
        toString in class Object
        Returns:
        the field as a String