Class ParameterRef
- java.lang.Object
-
- de.aristaflow.adept2.model.common.paramref.ParameterRef
-
- All Implemented Interfaces:
LocalisedString
,Serializable
- Direct Known Subclasses:
IOParameterRef
public class ParameterRef extends Object implements Serializable, LocalisedString
Represents a reference to a parameter in the strings returned bySystemDataConsumer
s. These parameters are usuallynode parameters
, but parameter references may be used in other contexts as well.Instances of this class are usually created by one of the utility methods provided by
SystemDataTools
.- Author:
- Patrick Schmidt
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description ParameterRef(ProcessConstants.AdeptDataType dataType, String name)
Creates a new parameter reference for a parameter of arbitrary data type exceptProcessConstants.AdeptDataType.USERDEFINED
.ParameterRef(String name, ProcessConstants.AdeptDataType dataType, String udtName)
Constructs a newParameterRef
with the specified name, data type and name of UDT.protected
ParameterRef(String name, ProcessConstants.AdeptDataType dataType, String udtName, boolean discriminator)
Constructs a newParameterRef
with the specified name, data type and name of UDT.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
ProcessConstants.AdeptDataType
getDataType()
Returns the data type of the referenced parameter.String
getName()
Returns the name of the referenced parameter.String
getUdtName()
The name of the user-defined type ornull
in case the parameter is not of user-defined type ore the name is not defined.int
hashCode()
String
toLocalisedString(LocalisationFactory locFac, Locale loc)
Gets the localised representation of the implementing object.String
toString()
Returns a string of the form%<typeId>:<parameterName>%
as specified inSystemDataConsumer
.
-
-
-
Field Detail
-
name
protected final String name
The name of the referenced parameter.
-
dataType
protected final ProcessConstants.AdeptDataType dataType
The data type of the referenced parameter.
-
udtName
protected final String udtName
The name of the UDT ornull
in case it is not a UDT.
-
-
Constructor Detail
-
ParameterRef
public ParameterRef(ProcessConstants.AdeptDataType dataType, String name)
Creates a new parameter reference for a parameter of arbitrary data type exceptProcessConstants.AdeptDataType.USERDEFINED
.- Parameters:
dataType
- The type of the parameter of this reference.name
- The name of the parameter of this reference. This must not benull
.
-
ParameterRef
public ParameterRef(String name, ProcessConstants.AdeptDataType dataType, String udtName)
Constructs a newParameterRef
with the specified name, data type and name of UDT.- Parameters:
name
- The name of the referenced parameter. This must not benull
or an empty or blank string.dataType
- The data type of the referenced parameter.udtName
- The name of the UDT in case it is a UDT and the name is known,null
otherwise.
-
ParameterRef
protected ParameterRef(String name, ProcessConstants.AdeptDataType dataType, String udtName, boolean discriminator)
Constructs a newParameterRef
with the specified name, data type and name of UDT.- Parameters:
name
- The name of the referenced parameter. Subclasses can providenull
.dataType
- The data type of the referenced parameter.udtName
- The name of the UDT in case it is a UDT and the name is known,null
otherwise.discriminator
- An unused parameter to discriminateParameterRef(String, AdeptDataType, String)
.
-
-
Method Detail
-
getName
public String getName()
Returns the name of the referenced parameter.- Returns:
- the name of the referenced parameter
-
getDataType
public ProcessConstants.AdeptDataType getDataType()
Returns the data type of the referenced parameter.- Returns:
- the data type of the referenced parameter
-
getUdtName
public String getUdtName()
The name of the user-defined type ornull
in case the parameter is not of user-defined type ore the name is not defined.- Returns:
- The name of the user-defined type or
null
.
-
toString
public String toString()
Returns a string of the form%<typeId>:<parameterName>%
as specified inSystemDataConsumer
.
-
toLocalisedString
public String toLocalisedString(LocalisationFactory locFac, Locale loc)
Description copied from interface:LocalisedString
Gets the localised representation of the implementing object. The localisation should be for the designated locale, model objects beingLocalised
should use the designated localisation factory for automatic localisation.- Specified by:
toLocalisedString
in interfaceLocalisedString
- Parameters:
locFac
- The localisation factory to be used byLocalised
model objects. If this isnull
, do not localise the usedLocalised
attributes.loc
- The locale for which to get the localised string. If this isnull
, treat it likeLocale.ROOT
has been requested.- Returns:
- The localised (string) representation of the implementing object for the designated locale using the designated localisation factory if appropriate.
-
-