|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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. |
| Fields inherited from class net.sourceforge.nrl.parser.operators.PropertyAwareObject |
|---|
listeners |
| 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, firePropertyChange, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, 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 add
public 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 IOperatorpublic String getImplementationDetail(String label)
IOperator
See IImplementationDetail for more information.
getImplementationDetail in interface IOperatorlabel - the label
public Collection<IImplementationDetail> getImplementationDetails()
IOperatorIImplementationDetail 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 IOperatorIImplementationDetail objectspublic String getName()
IOperator
getName in interface IOperatorpublic NRLDataType getNRLReturnType()
IOperatorNRLDataType.UNKNOWN.
getNRLReturnType in interface IOperatorpublic IParameter getParameter(String name)
IOperator
getParameter in interface IOperatorname - parameter name
public List<IParameter> getParameters()
IOperatorIParameter objects.
getParameters in interface IOperatorpublic String getPurpose()
IOperator
getPurpose in interface IOperatorpublic IModelElement getReturnType()
IOperatorIOperator.resolveModelReferences(IModelCollection) before this.
getReturnType in interface IOperatorpublic String getReturnTypeName()
IOperator
getReturnTypeName in interface IOperatorpublic void removeParameter(IParameter param)
public List<NRLError> resolveModelReferences(IModelCollection models)
IOperator
resolveModelReferences in interface IOperatormodels - the models
public void setDocumentation(String documentation)
public void setName(String name)
public void setNRLReturnType(NRLDataType returnType)
IOperator
setNRLReturnType in interface IOperatorreturnType - the typepublic void setPurpose(String purpose)
public void setReturnType(IModelElement returnType)
IOperator
setReturnType in interface IOperatorreturnType - the typepublic void setReturnTypeName(String returnTypeName)
IOperator
setReturnTypeName in interface IOperatorreturnTypeName - the name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||