Class StructFlattener.StructMapping

java.lang.Object
nz.org.riskscape.engine.output.StructFlattener.StructMapping
Enclosing class:
StructFlattener

public static class StructFlattener.StructMapping extends Object

A mapping from a possibly nested struct member to a flattened member. A list of struct mappings, conceptually, define a new struct type that contains no nested members.

  • Constructor Details

    • StructMapping

      public StructMapping(String key, nz.org.riskscape.engine.types.Type type, List<nz.org.riskscape.engine.types.Struct.StructMember> segments)
  • Method Details

    • getType

      public nz.org.riskscape.engine.types.Type getType()

      The type of the member

    • getSegments

      public List<nz.org.riskscape.engine.types.Struct.StructMember> getSegments()

      A list of members that can be "followed" to access the possibly nested struct member.

    • getAccessExpression

      public StructMemberAccessExpression getAccessExpression()

      An expression that can access the source struct member - the realized type of this will match type

    • getKey

      public String getKey()