public abstract class TypeDeclaration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static TypeDeclaration |
INT
Utility constant usable for any type declaration object declaring a INT.
|
static TypeDeclaration |
NAME
Utility constant usable for any type declaration object declaring a NAME.
|
static TypeDeclaration |
STRING
Utility constant usable for any type declaration object declaring a STRING.
|
Modifier and Type | Method and Description |
---|---|
static TypeDeclaration |
getCommonSubTypeDeclaration(TypeDeclaration t1,
TypeDeclaration t2)
Gets the least specific common subtype between the two types given
|
static TypeDeclaration |
getCommonSuperTypeDeclaration(TypeDeclaration t1,
TypeDeclaration t2)
Gets the most specific common supertype between the two types given
|
static TypeDeclaration |
getTypeDeclaration(Heading heading,
NameIdentifier typeName)
Factory method for obtaining TypeDeclaration objects
|
static TypeDeclaration |
getTypeDeclaration(Heading heading,
java.lang.String typeName)
Deprecated.
- replace with
getTypeNameIdentifier() |
java.lang.String |
getTypeName()
Gets The type name
|
NameIdentifier |
getTypeNameIdentifier()
Gets The type name
|
abstract ValueBuffer |
getValueBuffer(java.nio.ByteBuffer attributeValueEncoding)
Gets the appropriate (i.e.
|
abstract boolean |
isIntervalTyped()
Checks whether the declared scalar type is interval-typed.
|
static boolean |
isNonScalarType(java.lang.String typeName)
Checks whether the given type name indicates a NonScalar Type.
|
abstract boolean |
isScalar()
Checks whether the declared type is scalar
|
static boolean |
isScalarType(java.lang.String typeName)
Checks whether the given type name indicates a Scalar Type.
|
abstract boolean |
matchesExpectedTypeDeclaration(TypeDeclaration expectedTypeDeclaration)
Checks whether this type declaration "matches" the given expected type declaration, i.e.
|
public static final TypeDeclaration INT
public static final TypeDeclaration NAME
public static final TypeDeclaration STRING
public static TypeDeclaration getCommonSubTypeDeclaration(TypeDeclaration t1, TypeDeclaration t2) throws NotFoundException
t1
- type 1t2
- type 2NotFoundException
- If no such subtype existspublic static TypeDeclaration getCommonSuperTypeDeclaration(TypeDeclaration t1, TypeDeclaration t2) throws NotFoundException
t1
- type 1t2
- type 2NotFoundException
- if no such common supertype existspublic static TypeDeclaration getTypeDeclaration(Heading heading, NameIdentifier typeName)
heading
- The heading that further defines the type details for a nonscalar type. Required if the type is indeed nonscalar.typeName
- The name of the type@Deprecated public static TypeDeclaration getTypeDeclaration(Heading heading, java.lang.String typeName)
getTypeNameIdentifier()
heading
- The heading that further defines the type details for a nonscalar type. Required if the type is indeed nonscalar.typeName
- The name of the typepublic static boolean isNonScalarType(java.lang.String typeName)
typeName
- a type namepublic static boolean isScalarType(java.lang.String typeName)
typeName
- a type namepublic final java.lang.String getTypeName()
public final NameIdentifier getTypeNameIdentifier()
public abstract ValueBuffer getValueBuffer(java.nio.ByteBuffer attributeValueEncoding)
attributeValueEncoding
- an encoding of a value of this typepublic abstract boolean isIntervalTyped()
public abstract boolean isScalar()
public abstract boolean matchesExpectedTypeDeclaration(TypeDeclaration expectedTypeDeclaration)
expectedTypeDeclaration
- A type declaration that is expected to be a declaration for a supertype of this one