Groovy Documentation

in.labulle.anycode.engine.groovy.directive
[Groovy] Class ObjectiveCDirective

java.lang.Object
  in.labulle.anycode.engine.groovy.directive.AnycodeDirective
      in.labulle.anycode.engine.groovy.directive.ObjectiveCDirective

class ObjectiveCDirective
extends AnycodeDirective

Method Summary
def attribute(IAttribute a)

Renders attribute.

def classImports(IClassifier c)

Renders automatically '@class' imports based on dependent attributes.

def datatype(IAttribute a, String collectionClassName)

Renders attribute's datatype declaration.

def datatype(IAttribute a)

Renders attribute's datatype declaration.

def getAttributeName(IAttribute a)

Renders attribute's name.

def getDataTypeName(IClassifier d, String modifier)

Renders datatype's name.

protected def getOperationName(IOperation op)

Renders operation name.

def operationImplementation(IOperation op)

Renders operation implementation. format '- [(returnType)|(void)] [operation name]([params]) { }'.

def operationSignature(IOperation op)

Renders operation signature. format '- [(returnType)|(void)] [operation name]([params])'.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Method Detail

attribute

def attribute(IAttribute a)
Renders attribute. Format [datatype] [attribute name];
Parameters:
a - attribute.
Returns:
attribute declaration as a GString.


classImports

def classImports(IClassifier c)
Renders automatically '@class' imports based on dependent attributes.
Parameters:
c - classifier.
Returns:
class imports as a GString.


datatype

def datatype(IAttribute a, String collectionClassName)
Renders attribute's datatype declaration. If type is multivalued, then the given collectionClassName is used as a datatype.
Parameters:
a - attribute.
collectionClassName - name of the collection class (e.g. : NSArray *).
Returns:
datatype declaration as a GString.


datatype

def datatype(IAttribute a)
Renders attribute's datatype declaration. Calls the underlying datatype(IAttribute, String) with 'NSArray *' collection class name.
Parameters:
a - attribute
Returns:
datatype declaration as a GString.


getAttributeName

def getAttributeName(IAttribute a)
Renders attribute's name.
Parameters:
a - attribute.
Returns:
attribute's name or datatype name if relation attribute has no specific name.


getDataTypeName

def getDataTypeName(IClassifier d, String modifier)
Renders datatype's name. This is mainly used to render primitive datatype names automatically and apply a mapping to Objective-C types :
Parameters:
d - classifier
modifier - type's modifier (not used in the current implementation).
Returns:
datatype name as a String.


getOperationName

protected def getOperationName(IOperation op)
Renders operation name.
Parameters:
op - operation.
Returns:
operation 'name' attribute.


operationImplementation

def operationImplementation(IOperation op)
Renders operation implementation. format '- [(returnType)|(void)] [operation name]([params]) { }'.
Parameters:
op - operation.
Returns:
operation implementation as a GString.


operationSignature

def operationSignature(IOperation op)
Renders operation signature. format '- [(returnType)|(void)] [operation name]([params])'. Note that there is no semi colon at the end of the operation signature.
Parameters:
op - operation.
Returns:
operation signature as a GString.


 

Groovy Documentation