Class FieldType<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void assertAssignable​(java.lang.Object c, java.lang.String fieldName)
      This method is intended for internal use only and may be removed at any time - do not use.
      abstract T defaultValue()
      Get the default value for this field type.
      java.lang.String format​(java.lang.Object value)
      Format the given value in MonitorScript representation.
      java.lang.String getName()
      Return the name of this type.
      java.lang.Class<? super T> getTypeClass()
      Return the Java type used for parsed values of this field type.
      Field<T> newField​(java.lang.String name)
      Creates a new Field object with the specified name, using this field type.
      T parse​(java.lang.String value)
      Parse an Apama string representation of this field type into an object representing its value.
      java.lang.String toString()
      Returns a String representation of the field type.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • newField

        public Field<T> newField​(java.lang.String name)
        Creates a new Field object with the specified name, using this field type. This is exactly the same as calling the Field constructor, but involves less typing because Java will automatically infer the generic type parameters.
        Parameters:
        name - The field name
        Returns:
        A new Field object
      • getName

        public java.lang.String getName()
        Return the name of this type.
        Returns:
        the type name
      • getTypeClass

        public java.lang.Class<? super T> getTypeClass()
        Return the Java type used for parsed values of this field type.
        Returns:
        the the Java type used for parsed values of this field type.
      • format

        public java.lang.String format​(java.lang.Object value)
        Format the given value in MonitorScript representation.
        Parameters:
        value - the value to format
        Returns:
        the formatted value
      • parse

        public T parse​(java.lang.String value)
                throws ParserRuntimeException
        Parse an Apama string representation of this field type into an object representing its value.
        Parameters:
        value - the value to parse
        Returns:
        an object specifying the value, the type of which depends on which class this method is called on.
        Throws:
        ParserRuntimeException - if some problem occurs
      • assertAssignable

        public abstract void assertAssignable​(java.lang.Object c,
                                              java.lang.String fieldName)
        This method is intended for internal use only and may be removed at any time - do not use.
      • toString

        public java.lang.String toString()
        Returns a String representation of the field type. Note that this representation will use the Java toString() method to format the results, and is not valid monitorscript.
        Overrides:
        toString in class java.lang.Object
      • defaultValue

        public abstract T defaultValue()
        Get the default value for this field type.
        Returns: