Module org.praxislive.code
Package org.praxislive.code
Class PortDescriptor<T extends PortDescriptor<T>>
java.lang.Object
org.praxislive.code.Descriptor<T>
org.praxislive.code.PortDescriptor<T>
A PortDescriptor wraps a Port in a CodeContext. It includes ID, category,
order and info, as well as configuring the port on attachment and reset. The
underlying port may be configured from the previous iteration or carried
across.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPortDescriptor(Class<T> type, String id, PortDescriptor.Category category, int index) Create a PortDescriptor. -
Method Summary
-
Constructor Details
-
PortDescriptor
Create a PortDescriptor.- Parameters:
type- descriptor typeid- the ID (must be a valid port ID)category- the categoryindex- the index within the category (used for ordering - must be unique)
-
-
Method Details
-
category
Get the category.- Returns:
- category
-
index
public int index()Get the index.- Returns:
- index
-
port
Get the wrapped port. Should only be called when attached - behaviour is otherwise undefined.- Returns:
- port
-
portInfo
Get port info.- Returns:
- info
-
dispose
public void dispose()Dispose the port descriptor. The default implementation callsPort.disconnectAll(). When overriding this method, call the super implementation or otherwise ensure that the port is disconnected.- Overrides:
disposein classDescriptor<T extends PortDescriptor<T>>
-