wt.tools.metamodel
Class Operation

java.lang.Object
  extended bywt.tools.metamodel.ModelElement
      extended bywt.tools.metamodel.ClassMember
          extended bywt.tools.metamodel.Operation
All Implemented Interfaces:
Cloneable

public class Operation
extends ClassMember


Field Summary
protected  boolean classInitializer
           
protected  String concurrency
           
private  ClassProperty delegate
           
protected  Vector exceptions
           
protected  boolean isAbstract
           
protected  boolean isNative
           
protected  boolean isSynchronized
           
protected  boolean methodBodyEditable
           
protected  boolean methodBodyGenerated
           
protected  MethodBody methodBodyType
           
protected  Vector parameters
           
protected  String postConditions
           
protected  String preConditions
           
protected  String protocol
           
protected  String qualification
           
protected  String semantics
           
protected  String size
           
protected  String time
           
 
Fields inherited from class wt.tools.metamodel.ClassMember
access, isFinal, isStatic, originalMember, owner, type, typePackage
 
Fields inherited from class wt.tools.metamodel.ModelElement
customizations, DEBUG, documentation, LINE_SEPARATOR, name, nextID, properties, RESOURCE, source, stereotype, store, supportedAPI, TRACE, uid
 
Constructor Summary
protected Operation()
           
protected Operation(String theUid)
           
(package private) Operation(String theUid, ClassClass theOwner)
           
 
Method Summary
 void addException(String newException)
           
 Parameter addParameter(String newName, String newType, String newInit, int position)
           
 void defaultException(String newException)
           
 void defaultMethodBodyType(MethodBody newType)
           
 String getConcurrency()
           
 ClassProperty getDelegate()
           
protected  String getElementCode()
           
 Enumeration getExceptions()
           
 MethodBody getMethodBodyType()
           
 ClassMember getOriginalMember()
          Return the originally modeled Operation from the hierarchy.
 ClassMember getOriginalMember(ClassClass from_class)
          Return the originally modeled Operation from the from_classes hierarchy.
 Parameter getParameter(int index)
           
 int getParameterCount()
           
 Enumeration getParameters()
           
 String getPostConditions()
           
 String getPreConditions()
           
 String getProtocol()
           
 String getQualification()
           
 String getSemantics()
           
 String getSize()
           
 String getSourceId()
          This method is overriden to ensure unique id's, in the cases where multiple operations are generated from a single modeled element.
 String getTime()
           
 boolean isClassInitializer()
           
 boolean isConstructor()
           
 boolean isMethodBodyEditable()
           
 boolean isMethodBodyGenerated()
           
 boolean isNative()
           
 boolean isOverride()
          Return true if this method is an overriding implementation, of an implementation that was defined higher in the hierarchy.
 boolean isSynchronized()
           
protected  void loadFromStore()
           
static Operation make(String newName)
           
(package private)  void setClassInitializer(boolean isClassInitializer)
           
protected  void setDefaults()
           
 void setDelegate(ClassProperty delegate)
           
 void setExceptions(String theExceptions)
           
 void setMethodBodyEditable(boolean editable)
           
 void setMethodBodyType(MethodBody newType)
           
(package private)  void setOwner(ClassClass theOwner)
           
 void setSynchronized(boolean setSynchronized)
           
protected  void writeToStore()
           
 
Methods inherited from class wt.tools.metamodel.ClassMember
clone, getCodeType, getContainingClass, getCustomization, getOwner, getType, getTypePackage, getUnqualifiedType, getVisibility, isAbstract, isArray, isConstant, isDependency, isFinal, isPrivateVisibility, isStatic, setAbstract, setFinal, setPackageType, setStatic, setType, setType, setVisibility, typeCleanup
 
Methods inherited from class wt.tools.metamodel.ModelElement
ensureDeferredLoaded, getBoolean, getBoolean, getCustomization, getCustomizations, getDocumentation, getName, getOriginalSource, getProperty, getProperty, getProperty, getProperty, getSource, getStereotype, getSupportedAPI, getUid, initialize, initialize, isDeprecated, loadCustomizations, loadFromStoreDeferred, setBoolean, setDocumentation, setName, setProperty, setSource, setStereotype, setStore, setSupportedAPI, setUid, store, storeForPackage, toString, transferProperty, writeToStore
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

exceptions

protected Vector exceptions

preConditions

protected String preConditions

semantics

protected String semantics

postConditions

protected String postConditions

protocol

protected String protocol

qualification

protected String qualification

concurrency

protected String concurrency

time

protected String time

size

protected String size

isAbstract

protected boolean isAbstract

isNative

protected boolean isNative

isSynchronized

protected boolean isSynchronized

classInitializer

protected boolean classInitializer

methodBodyType

protected MethodBody methodBodyType

methodBodyEditable

protected boolean methodBodyEditable

methodBodyGenerated

protected boolean methodBodyGenerated

parameters

protected Vector parameters

delegate

private ClassProperty delegate
Constructor Detail

Operation

protected Operation()

Operation

protected Operation(String theUid)
             throws WTException

Operation

Operation(String theUid,
          ClassClass theOwner)
    throws WTException
Method Detail

addException

public void addException(String newException)

addParameter

public Parameter addParameter(String newName,
                              String newType,
                              String newInit,
                              int position)

defaultException

public void defaultException(String newException)

defaultMethodBodyType

public final void defaultMethodBodyType(MethodBody newType)

getConcurrency

public String getConcurrency()

getDelegate

public ClassProperty getDelegate()

getElementCode

protected String getElementCode()
Specified by:
getElementCode in class ModelElement

getExceptions

public Enumeration getExceptions()

getMethodBodyType

public final MethodBody getMethodBodyType()

getOriginalMember

public ClassMember getOriginalMember()
Return the originally modeled Operation from the hierarchy. If Operation is not an override, it will return itself.

Specified by:
getOriginalMember in class ClassMember

getOriginalMember

public ClassMember getOriginalMember(ClassClass from_class)
Return the originally modeled Operation from the from_classes hierarchy. If Operation is not an override, it will return itself.


getParameter

public Parameter getParameter(int index)

getParameterCount

public int getParameterCount()

getParameters

public Enumeration getParameters()

getPostConditions

public String getPostConditions()

getPreConditions

public String getPreConditions()

getProtocol

public String getProtocol()

getQualification

public String getQualification()

getSemantics

public String getSemantics()

getSize

public String getSize()

getSourceId

public String getSourceId()
This method is overriden to ensure unique id's, in the cases where multiple operations are generated from a single modeled element. For example: 1 Attribute = Getter + Setter 1 Constructor = Factory + Initialize

Overrides:
getSourceId in class ModelElement

getTime

public String getTime()

isClassInitializer

public boolean isClassInitializer()

isConstructor

public boolean isConstructor()

isMethodBodyEditable

public final boolean isMethodBodyEditable()

isMethodBodyGenerated

public final boolean isMethodBodyGenerated()

isNative

public boolean isNative()

isOverride

public boolean isOverride()
Return true if this method is an overriding implementation, of an implementation that was defined higher in the hierarchy. For example, it will return false if this same operation signature is found to have been previously defined in the class hierarchy, as a non-abstract operation.

Specified by:
isOverride in class ClassMember

isSynchronized

public boolean isSynchronized()

loadFromStore

protected void loadFromStore()
                      throws WTException
Overrides:
loadFromStore in class ClassMember
Throws:
WTException

make

public static Operation make(String newName)

setClassInitializer

void setClassInitializer(boolean isClassInitializer)

setDefaults

protected void setDefaults()
Overrides:
setDefaults in class ClassMember

setDelegate

public void setDelegate(ClassProperty delegate)

setExceptions

public void setExceptions(String theExceptions)

setMethodBodyEditable

public void setMethodBodyEditable(boolean editable)

setMethodBodyType

public final void setMethodBodyType(MethodBody newType)

setOwner

void setOwner(ClassClass theOwner)
Overrides:
setOwner in class ClassMember

setSynchronized

public void setSynchronized(boolean setSynchronized)

writeToStore

protected void writeToStore()
Overrides:
writeToStore in class ClassMember