Package com.piketec.tpt.api
Interface Type
-
- All Superinterfaces:
IdentifiableRemote
,java.rmi.Remote
,TptRemote
public interface Type extends IdentifiableRemote
A type is the data type of aDeclaration
. Create and get types by usingProject.createType(String, String)
,Project.getTypes()
. For predefined types use for exampleProject.getTypeDouble()
.- Author:
- Copyright (c) 2014-2024 Piketec GmbH - MIT License (MIT) - All rights reserved
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getName()
Get the name of the type.java.lang.String
getTypeString()
Get the type definition as a string as seen in tptaif or in the type editor.boolean
isAnonymous()
Determine if the type is anonymous, i.e., if the type is not a custom type with an explicitly declared name.boolean
isDeclared()
Determine if the type is declared, i.e., if the type is a custom type explicitly declared in the type editor of TPT.boolean
isPredefined()
Determines if the type is "predefined".-
Methods inherited from interface com.piketec.tpt.api.IdentifiableRemote
getIdentifier
-
-
-
-
Method Detail
-
getName
java.lang.String getName() throws java.rmi.RemoteException
Get the name of the type.- Returns:
- The name of the type.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTypeString
java.lang.String getTypeString() throws java.rmi.RemoteException
Get the type definition as a string as seen in tptaif or in the type editor.- Returns:
- The type definition as a string.
- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
for examples of the type syntax
-
isPredefined
boolean isPredefined() throws java.rmi.RemoteException
Determines if the type is "predefined".- Any primitive type without a declared name and without enum consts is predefined.
- String types without a declared name are predefined.
- All other types are not predefined.
- Returns:
true
if the type is predefined,false
otherwise.- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
isAnonymous()
-
isAnonymous
boolean isAnonymous() throws java.rmi.RemoteException
Determine if the type is anonymous, i.e., if the type is not a custom type with an explicitly declared name. This is the inverse function ofisDeclared()
.- Returns:
true
if the type is anonymous,false
otherwise.- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
isDeclared()
-
isDeclared
boolean isDeclared() throws java.rmi.RemoteException
Determine if the type is declared, i.e., if the type is a custom type explicitly declared in the type editor of TPT. This is the inverse function ofisAnonymous()
.- Returns:
true
if the type is declared with a custom name,false
otherwise.- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
isAnonymous()
-
-