- All Superinterfaces:
AnyType,QilletniType
A Qilletni type that references any Java type instance. This is so native methods can access references that
Qilletni can deal with.
-
Method Summary
Modifier and TypeMethodDescription<T> Optional<T> getOptionalReference(Class<T> refType) Gets the reference this type holds as an optional, giving an empty optional if not set yet orempty.<T> TgetReference(Class<T> refType) Gets the reference held by the type, or null.voidsetReference(Object reference) Sets the type's reference to anything, overriding any previous reference.Methods inherited from interface dev.qilletni.api.lang.types.QilletniType
getTypeClass, minusOperator, minusOperatorInPlace, plusOperator, plusOperatorInPlace, qilletniEquals, stringValue, typeName
-
Method Details
-
getOptionalReference
Gets the reference this type holds as an optional, giving an empty optional if not set yet orempty.- Type Parameters:
T- The type of the reference- Parameters:
refType- The class type the reference is assumed to be- Returns:
- The optional of the type's reference
-
getReference
Gets the reference held by the type, or null.- Type Parameters:
T- The type of the reference- Parameters:
refType- class type the reference is assumed to be- Returns:
- The type's reference, or null
-
setReference
Sets the type's reference to anything, overriding any previous reference.- Parameters:
reference- The reference the type should hold
-