FieldInfo (taack-ui 0.3.8 API)
Package: taack.ast.type

[Groovy] Class FieldInfo<T>

    • taack.ast.type.FieldInfo


    • @groovy.transform.CompileStatic
      final class FieldInfo<T>
      extends java.lang.Object

      Container class holding the meta-information needed by the framework.

      Type Parameters:
      T - Type of the field

      • Properties Summary

          Properties 
          Type Name and description
          FieldConstraint  fieldConstraint
          Data class containing constraints Grails domain constraint closure data.
          java.lang.String  fieldName
          Name of the field or name of the field + key if the field is a map.
          T  value
          Reference to the value of the object
      • Constructor Summary

          Constructors 
          Constructor and description
          FieldInfo (FieldConstraint fieldConstraint, java.lang.String fieldName, T value)
      • Methods Summary

          Methods 
          Type Params Return Type Name and description
          final java.lang.String getEmbeddedValue(java.lang.String name)
          If value point to an object, or a map, by name
          final java.lang.String getMapFieldKey()
          Returns:
          The key value.
          final java.lang.String getMapFieldName()
          Returns:
          Name of the field that contains the map.
          final java.lang.Object getMapValue()
          Returns:
          The object value.
          final boolean isMapKey()
          final boolean isMapValue()
          static final FieldInfo mapKey(FieldInfo fieldInfo, java.lang.String key)
          Create a FieldInfo from another FieldInfo that point to a map, using its key.
          static final FieldInfo mapValue(FieldInfo fieldInfo, java.lang.String key)
          Create a FieldInfo from another FieldInfo that point to a map, using its key.
          java.lang.String toString()
      • Inherited Methods Summary

          Inherited Methods 
          Methods inherited from class Name
          class java.lang.Object java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
      • Property Detail

        • final FieldConstraint fieldConstraint

          Data class containing constraints Grails domain constraint closure data.

        • final java.lang.String fieldName

          Name of the field or name of the field + key if the field is a map. In case the field is a map of object, can be used to access individual key, value pair of the map (see mapKey and mapValue). The Ui framework allow this way to treat map like regular objects.

        • final T value

          Reference to the value of the object

      • Constructor Detail

        • FieldInfo(FieldConstraint fieldConstraint, java.lang.String fieldName, T value)

      • Method Detail

        • final java.lang.String getEmbeddedValue(java.lang.String name)

          If value point to an object, or a map, by name

          Parameters:
          name
          Returns:
          the value of object.name

        • final java.lang.String getMapFieldKey()

          Returns:
          The key value.

        • final java.lang.String getMapFieldName()

          Returns:
          Name of the field that contains the map.

        • final java.lang.Object getMapValue()

          Returns:
          The object value.

        • final boolean isMapKey()

        • final boolean isMapValue()

        • static final FieldInfo mapKey(FieldInfo fieldInfo, java.lang.String key)

          Create a FieldInfo from another FieldInfo that point to a map, using its key.

          Parameters:
          fieldInfo
          key
          Returns:
          FieldInfo for the key

        • static final FieldInfo mapValue(FieldInfo fieldInfo, java.lang.String key)

          Create a FieldInfo from another FieldInfo that point to a map, using its key.

          Parameters:
          fieldInfo
          key
          Returns:
          FieldInfo for the value pointed by the map entry

        • @java.lang.Override java.lang.String toString()