Interface SelfDescribingScalarData
- All Known Subinterfaces:
LookupTable
,Relation
,TypedCoverage
- All Known Implementing Classes:
EmptyRelation
,TypedCoverage.Empty
An optional interface for an object that can describe itself in terms of RiskScape types. This allows an arbitrary
instance of SelfDescribingScalarData
to be injected in to a pipeline or an expression with correct type
information.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the RiskScape type that describes this data when extracted from a project and added in to a pipeline as a scalar value.getScalarDataType
(Object instance) Handy method that will attempt top return you a riskscape type for an object, first checking if it's self describing, then falling back toTypes.fromJavaType(Class)
-
Method Details
-
getScalarDataType
Handy method that will attempt top return you a riskscape type for an object, first checking if it's self describing, then falling back to
Types.fromJavaType(Class)
-
getScalarDataType
Type getScalarDataType()Returns the RiskScape type that describes this data when extracted from a project and added in to a pipeline as a scalar value.
It is referred to as the scalar type to make it clear it's not the same as the
Type
of the data contained within it, e.g. theStruct
type of the relation (non-scalar) vsRelationType
that represents the relation itself (scalar).
-