Class StaticDomainOperationTypeResolvers
- java.lang.Object
-
- com.blazebit.domain.runtime.model.StaticDomainOperationTypeResolvers
-
public final class StaticDomainOperationTypeResolvers extends Object
A domain operation type resolver utility that caches static resolvers.- Since:
- 1.0.0
- Author:
- Christian Beikov
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DomainOperationTypeResolver
returning(String typeName)
Returns a domain operation type resolver that always returns the domain type with the given type name.static DomainOperationTypeResolver
returning(String returningTypeName, String... supportedTypeNames)
Returns a domain operation type resolver that returns the domain type with the given type name.static DomainOperationTypeResolver
returning(String returningTypeName, String[][] supportedTypeNamesPerOperand)
Returns a domain operation type resolver that returns the domain type with the given type name.static DomainOperationTypeResolver
widest(String... typeNames)
Returns a domain operation type resolver that returns the domain type with one of the given type names, preferring "smaller" types with lower indices.
-
-
-
Method Detail
-
returning
public static DomainOperationTypeResolver returning(String typeName)
Returns a domain operation type resolver that always returns the domain type with the given type name.- Parameters:
typeName
- The static domain type name- Returns:
- the domain operation type resolver
-
returning
public static DomainOperationTypeResolver returning(String returningTypeName, String... supportedTypeNames)
Returns a domain operation type resolver that returns the domain type with the given type name. If the arguments for a operation are none of the supported types, the operation type resolver will throw anIllegalArgumentException
.- Parameters:
returningTypeName
- The domain type name that a operation producessupportedTypeNames
- The domain type names that are supported for a operation- Returns:
- the domain operation type resolver
- Since:
- 1.0.12
-
returning
public static DomainOperationTypeResolver returning(String returningTypeName, String[][] supportedTypeNamesPerOperand)
Returns a domain operation type resolver that returns the domain type with the given type name. If the arguments for a operation are none of the supported types, the operation type resolver will throw anIllegalArgumentException
.- Parameters:
returningTypeName
- The domain type name that a operation producessupportedTypeNamesPerOperand
- The domain type names that are supported for a operation- Returns:
- the domain operation type resolver
- Since:
- 1.0.13
-
widest
public static DomainOperationTypeResolver widest(String... typeNames)
Returns a domain operation type resolver that returns the domain type with one of the given type names, preferring "smaller" types with lower indices. A "wider" type is chosen if one of the operator arguments has a wider type.- Parameters:
typeNames
- The domain type names from small to wide- Returns:
- the domain operation type resolver
- Since:
- 1.0.12
-
-