|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.nrl.parser.operators.PropertyAwareObject net.sourceforge.nrl.parser.operators.Operator
public class Operator
A basic implementation of an operator. This supports listener notification if any fields are set.
Field Summary | |
---|---|
static String |
DOCUMENTATION_CHANGED
Event - documentation changed. |
static String |
IMPLEMENTATION_DETAILS_CHANGED
Event - implementation detail list changed. |
static String |
NAME_CHANGED
Event - name changed. |
static String |
PARAMETERS_CHANGED
Event - parameter list changed. |
static String |
PURPOSE_CHANGED
Event - purpose attribute changed. |
static String |
RETURN_TYPE_CHANGED
Event - return type changed. |
static String |
RETURN_TYPE_NAME_CHANGED
Event - return type name changed. |
Constructor Summary | |
---|---|
Operator()
|
Method Summary | |
---|---|
void |
addImplementationDetail(IImplementationDetail detail)
|
void |
addParameter(IParameter param)
Add a parameter to the end of the list. |
void |
addParameter(IParameter param,
IParameter before)
Add a parameter before another one. |
void |
clearImplementationDetail(String label)
|
void |
clearParameters()
|
String |
getDocumentation()
Get the documentation string attached to this operator, if any. |
String |
getImplementationDetail(String label)
Get an implementation detail associated with the operator, given its label. |
Collection<IImplementationDetail> |
getImplementationDetails()
Return all implementation details associated with the operator. |
String |
getName()
Return the operator name. |
NRLDataType |
getNRLReturnType()
Returns the return type of the operator. |
IParameter |
getParameter(String name)
Return a parameter by name |
List<IParameter> |
getParameters()
Return a list of IParameter objects. |
String |
getPurpose()
Return the purpose of this operator. |
IModelElement |
getReturnType()
Return the return type of the operator. |
String |
getReturnTypeName()
Return the name of the return type as found in the definition |
void |
removeParameter(IParameter param)
|
List<NRLError> |
resolveModelReferences(IModelCollection models)
Resolve all parameter type and return type references against models. |
void |
setDocumentation(String documentation)
|
void |
setName(String name)
|
void |
setNRLReturnType(NRLDataType returnType)
Set the NRL type of the return type |
void |
setPurpose(String purpose)
|
void |
setReturnType(IModelElement returnType)
Set the type this operator will return. |
void |
setReturnTypeName(String returnTypeName)
Set the raw name of the return type. |
Methods inherited from class net.sourceforge.nrl.parser.operators.PropertyAwareObject |
---|
addPropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DOCUMENTATION_CHANGED
public static final String NAME_CHANGED
public static final String IMPLEMENTATION_DETAILS_CHANGED
public static final String PARAMETERS_CHANGED
public static final String PURPOSE_CHANGED
public static final String RETURN_TYPE_CHANGED
public static final String RETURN_TYPE_NAME_CHANGED
Constructor Detail |
---|
public Operator()
Method Detail |
---|
public void addImplementationDetail(IImplementationDetail detail)
public void addParameter(IParameter param)
param
- the parameter to addpublic void addParameter(IParameter param, IParameter before)
param
- the parameter to addbefore
- the parameter before which to insert. If this is null, or the before
parameter is not in the list, "param" is inserted at the front.public void clearImplementationDetail(String label)
public void clearParameters()
public String getDocumentation()
IOperator
getDocumentation
in interface IOperator
public String getImplementationDetail(String label)
IOperator
See IImplementationDetail
for more information.
getImplementationDetail
in interface IOperator
label
- the label
public Collection<IImplementationDetail> getImplementationDetails()
IOperator
IImplementationDetail
for more information.
Note that this does not return the implementation details associated with parameters of the operators - those have to be read off the individual parameters.
getImplementationDetails
in interface IOperator
IImplementationDetail
objectspublic String getName()
IOperator
getName
in interface IOperator
public NRLDataType getNRLReturnType()
IOperator
NRLDataType.UNKNOWN
.
getNRLReturnType
in interface IOperator
public IParameter getParameter(String name)
IOperator
getParameter
in interface IOperator
name
- parameter name
public List<IParameter> getParameters()
IOperator
IParameter
objects.
getParameters
in interface IOperator
public String getPurpose()
IOperator
getPurpose
in interface IOperator
public IModelElement getReturnType()
IOperator
IOperator.resolveModelReferences(IModelCollection)
before this.
getReturnType
in interface IOperator
public String getReturnTypeName()
IOperator
getReturnTypeName
in interface IOperator
public void removeParameter(IParameter param)
public List<NRLError> resolveModelReferences(IModelCollection models)
IOperator
resolveModelReferences
in interface IOperator
models
- the models
public void setDocumentation(String documentation)
public void setName(String name)
public void setNRLReturnType(NRLDataType returnType)
IOperator
setNRLReturnType
in interface IOperator
returnType
- the typepublic void setPurpose(String purpose)
public void setReturnType(IModelElement returnType)
IOperator
setReturnType
in interface IOperator
returnType
- the typepublic void setReturnTypeName(String returnTypeName)
IOperator
setReturnTypeName
in interface IOperator
returnTypeName
- the name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |