io.sarl.api.util
Interface SarlSpecificationChecker
All Known Implementing Classes:
StandardSarlSpecificationChecker
interface SarlSpecificationChecker
Check if a given agent class follows a specific version of the SARL specifications.
Maven Group Identifier:
io.sarl.sdk
Maven Artifact Identifier:
api.util
Since:
0.5
Action Summary
Modifier and type Action and description
default int compareToSarlSpecificationVersion(Class<T>)
Compare the SARL specification version associated to the given type to the version of the current SARL.
default float getSarlSpecificationVersion(Class<T>)
Replies the supported SARL specification version of the given type.
Deprecated: since 0.10, see #getSarlSpecificationVersionObject(Class)
default org.osgi.framework.Version getSarlSpecificationVersionObject(Class<T>)
Replies the supported SARL specification version of the given type.
default boolean isValidSarlElement(Class<T>)
Replies if the given type is a SARL element that is following the specification of the current SARL version.
Action Details
compareToSarlSpecificationVersion(Class<T>)
def compareToSarlSpecificationVersion(Class<T>) : int
Compare the SARL specification version associated to the given type to the version of the current SARL.
Parameters:
type - the type to test.
Returns:
a negative integer value if the type's version is lower than the version of the current SARL, zero if the two versions are equal, a positive integer value if type's version is greater than the version of the current SARL.
getSarlSpecificationVersion(Class<T>)
def getSarlSpecificationVersion(Class<T>) : float
Replies the supported SARL specification version of the given type.
Parameters:
type - the type from which the SARL specification version should be extracted.
Returns:
The SARL specification version. The version is a floating-point number. The value NaN is replied if the given type has no marker related to the SARL specification version.
Deprecated:
since 0.10, see #getSarlSpecificationVersionObject(Class)
getSarlSpecificationVersionObject(Class<T>)
def getSarlSpecificationVersionObject(Class<T>) : org.osgi.framework.Version
Replies the supported SARL specification version of the given type.
Parameters:
type - the type from which the SARL specification version should be extracted.
Returns:
The SARL specification version. The version is a Version . The value null is replied if the given type has no marker related to the SARL specification version.
Since:
0.10
isValidSarlElement(Class<T>)
def isValidSarlElement(Class<T>) : boolean
Replies if the given type is a SARL element that is following the specification of the current SARL version.
Parameters:
type - the type to test.
Returns:
true if the given type follows the specification of the current version.