blob: bea10de8b4c919289799343b6f85760556ba9317 [file] [log] [blame]
«IMPORT 'java.xmi'»
«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
«EXTENSION jemUtil»
«EXTENSION xpt::StringOperations»
«DEFINE Main FOR java::JavaClass
«IF isValid(javaPackage)-»
package «javaPackage.fullyQualifiedName()»;
«ENDIF»
«EXPAND _import FOREACH classImport
/**
«EXPAND classComment FOREACH eAnnotations->select(a | a.source = 'description').details-»
*
* @generated
*/
«EXPAND annotation FOREACH eAnnotations->select(a | a.source = 'annotation').details
public class «name» «EXPAND _extends FOR self «EXPAND implements FOR self {
«EXPAND field FOREACH fields
«EXPAND reference FOREACH eReferences
«EXPAND method FOREACH methods
«EXPAND additions
}
«ENDDEFINE»
«DEFINE _extends FOR java::JavaClass
«IF getSupertype() <> null»extends «EXPAND superClass FOR getSupertype()-»«ENDIF
«ENDDEFINE»
«DEFINE implements FOR java::JavaClass
«IF implementsInterfaces->size() > 0»implements «EXPAND superClass FOREACH implementsInterfaces SEPARATOR ','-»«ENDIF
«ENDDEFINE»
«DEFINE superClass FOR java::JavaClass
«self.fullyQualifiedName()-»
«ENDDEFINE»
«DEFINE classComment FOR ecore::EStringToStringMapEntry
«IF key = null or key.xpandLength() = 0
* TODO: Enter description of the class here...«ELSE
* «key
«ENDIF»
«ENDDEFINE»
«DEFINE annotation FOR ecore::EStringToStringMapEntry
«key» «value»
«ENDDEFINE»
«DEFINE field FOR java::Field
«EXPAND generatedComment FOR self
«EXPAND annotation FOREACH eAnnotations->select(a | a.source = 'annotation').details
«javaVisibility.repr().toLower()» «wrapIfCollection(self «name»;
«ENDDEFINE»
«DEFINE reference FOR ecore::EReference
«EXPAND generatedComment FOR self
«EXPAND annotation FOREACH eAnnotations->select(a | a.source = 'annotation').details
private «wrapIfCollection(self «name»;
«ENDDEFINE»
«DEFINE method FOR java::Method
«EXPAND generatedComment FOR self
«EXPAND annotation FOREACH eAnnotations->select(a | a.source = 'annotation').details
«javaVisibility.repr().toLower()» «wrapIfCollection(self «name»(«EXPAND parameter FOREACH parameters SEPARATOR ','») {
«EXPAND block FOR source»
}
«ENDDEFINE»
«DEFINE parameter FOR java::JavaParameter
«wrapIfCollection(self «name
«ENDDEFINE»
«DEFINE block FOR java::Block
«self.source
«EXPAND block FOREACH contents
«ENDDEFINE»
«DEFINE block FOR java::Comment
/*
* «self.source»
*/
«EXPAND block FOREACH contents
«ENDDEFINE»
«DEFINE generatedComment FOR OclAny
/**
*@generated
*/
«ENDDEFINE»
«DEFINE _import FOR java::JavaClass
import «self.fullyQualifiedName() + ';
'
«ENDDEFINE»
«DEFINE additions FOR java::JavaClass-»«ENDDEFINE»