Class TypeDefinitions


  • public final class TypeDefinitions
    extends Object
    Type definitions helpers for generic types. Completes helper methods provided by TypeDefinition.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.forgerock.openig.model.type.StringTypeDefinition<Duration> DURATION_TYPE
      Represents the "Duration" type, which is a String with a specific Syntax.
      static org.forgerock.openig.model.type.Syntax<Version> PRODUCT_VERSION_SYNTAX
      The "PRODUCT_VERSION"'s Syntax.
      static org.forgerock.openig.model.type.StringTypeDefinition<Version> PRODUCT_VERSION_TYPE
      Represents the "PRODUCT_VERSION" type, which is a String with a specific Syntax.
      static org.forgerock.openig.model.type.Syntax<Realm> REALM_SYNTAX
      The "REALM"'s Syntax.
      static org.forgerock.openig.model.type.StringTypeDefinition<Realm> REALM_TYPE
      Represents the "PRODUCT_VERSION" type, which is a String with a specific Syntax.
      static org.forgerock.openig.model.type.StringTypeDefinition<URI> URI_TYPE
      Represents the "URI" type, which is a String with a specific Syntax.
    • Field Detail

      • DURATION_TYPE

        public static final org.forgerock.openig.model.type.StringTypeDefinition<Duration> DURATION_TYPE
        Represents the "Duration" type, which is a String with a specific Syntax.
      • URI_TYPE

        public static final org.forgerock.openig.model.type.StringTypeDefinition<URI> URI_TYPE
        Represents the "URI" type, which is a String with a specific Syntax.
      • PRODUCT_VERSION_SYNTAX

        public static final org.forgerock.openig.model.type.Syntax<Version> PRODUCT_VERSION_SYNTAX
        The "PRODUCT_VERSION"'s Syntax. See Version
      • PRODUCT_VERSION_TYPE

        public static final org.forgerock.openig.model.type.StringTypeDefinition<Version> PRODUCT_VERSION_TYPE
        Represents the "PRODUCT_VERSION" type, which is a String with a specific Syntax.
      • REALM_SYNTAX

        public static final org.forgerock.openig.model.type.Syntax<Realm> REALM_SYNTAX
        The "REALM"'s Syntax. See Realm
      • REALM_TYPE

        public static final org.forgerock.openig.model.type.StringTypeDefinition<Realm> REALM_TYPE
        Represents the "PRODUCT_VERSION" type, which is a String with a specific Syntax.
    • Method Detail

      • expressionOf

        public static <T> org.forgerock.openig.model.type.StringTypeDefinition<Expression<T>> expressionOf​(Class<T> type)
        Represents a runtime Expression of type T, which is a String with a specific Syntax.
        Type Parameters:
        T - The Expression's type
        Parameters:
        type - The Expression's type
        Returns:
        The TypeDefinition of a runtime expression.
      • expressionSyntaxOf

        public static <T> org.forgerock.openig.model.type.Syntax<Expression<T>> expressionSyntaxOf​(Class<T> type)
        Creates an expression Syntax that is bound to the given type.

        The produced syntax can coerce a String into a Expression<T> and the reverse (based on toString() of the expression).

        Type Parameters:
        T - Expression's type
        Parameters:
        type - expression's type (never null)
        Returns:
        a new Syntax that will parse a String into
      • purposeOf

        public static <T extends Secret> org.forgerock.openig.model.type.StringTypeDefinition<Purpose<T>> purposeOf​(Class<T> type)
        Represents a runtime Purpose of secret's type T, which is a String with a specific Syntax.
        Type Parameters:
        T - The Secret's type
        Parameters:
        type - The Secret's type
        Returns:
        The TypeDefinition of a Purpose.