public class PotentialAttribute
extends java.lang.Object
Coupling
consists of a Producer
and a
Consumer
, these attributes are usually not directly created, but
are created from a PotentialProducer
or
PotentialConsumer
object (using creation methods in
AttributeManager
).
Part of the reason for this is that a WorkspaceComponent needs to return a list of potential attributes that are not members of couplings, but that can be "actualized" to real attributes when creating a coupling.
PotentialAttributes contain all the same information as an attribute. For
more on what these fields mean see the javadocs for Attribute
Attribute
,
AttributeManager
,
Coupling
Modifier | Constructor and Description |
---|---|
protected |
PotentialAttribute(WorkspaceComponent parent,
java.lang.Object object,
java.lang.String methodName,
java.lang.Class<?> dataType,
java.lang.Class<?>[] argDataTypes,
java.lang.Object[] argValues,
java.lang.String description)
Construct a potential attribute.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?>[] |
getArgumentDataTypes() |
java.lang.Object[] |
getArgumentValues() |
java.lang.Object |
getBaseObject() |
java.lang.Class<?> |
getDataType() |
java.lang.String |
getDescription()
Returns a description of this potential attribute; used in GUI.
|
java.lang.String |
getMethodName() |
WorkspaceComponent |
getParent() |
protected void |
setArgumentDataTypes(java.lang.Class<?>[] argumentDataTypes) |
protected void |
setArgumentValues(java.lang.Object[] argumentValues) |
void |
setCustomDescription(java.lang.String description)
Set a custom description, overriding the default description.
|
protected PotentialAttribute(WorkspaceComponent parent, java.lang.Object object, java.lang.String methodName, java.lang.Class<?> dataType, java.lang.Class<?>[] argDataTypes, java.lang.Object[] argValues, java.lang.String description)
AttributeManager
should be called.
For more on what these fields mean see the javadocs for
Attribute
parent
- parent workspace componentobject
- base object containing method to callmethodName
- name of method to calldataType
- main data typeargDataTypes
- method signature for auxiliary argumentsargValues
- values for auxiliary argumentsdescription
- description of the attributepublic java.lang.String getDescription()
public WorkspaceComponent getParent()
public java.lang.String getMethodName()
public java.lang.Class<?> getDataType()
public java.lang.Object getBaseObject()
public java.lang.Class<?>[] getArgumentDataTypes()
public java.lang.Object[] getArgumentValues()
protected void setArgumentDataTypes(java.lang.Class<?>[] argumentDataTypes)
argumentDataTypes
- the argumentDataTypes to setprotected void setArgumentValues(java.lang.Object[] argumentValues)
argumentValues
- the argumentValues to setpublic void setCustomDescription(java.lang.String description)
description
- the description to set