blob: 6837f34d2622bfd64b48592b52ce97a9aa463be9 [file] [log] [blame]
«IMPORT java»
«IMPORT ecore»
«EXTENSION jemUtil»
«DEFINE Main FOR Collection[java::JavaPackage
«EXPAND package FOREACH this.typeSelect(JavaPackage
«ENDDEFINE»
«DEFINE package FOR java::JavaPackage
«EXPAND class FOREACH javaClasses.select(c | c.eAnnotations.first().source != 'library'
«EXPAND package FOREACH eSubpackages.typeSelect(JavaPackage
«ENDDEFINE»
«DEFINE class FOR java::JavaClass
«FILE this.fullyQualifiedPath()-»
«IF javaPackage.isValid()-»
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 this «EXPAND implements FOR this {
«EXPAND field FOREACH fields
«EXPAND reference FOREACH eReferences
«EXPAND method FOREACH methods
«EXPAND additions
}
«ENDFILE»
«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
«fullyQualifiedName(this)-»
«ENDDEFINE»
«DEFINE classComment FOR ecore::EStringToStringMapEntry
«IF key == null || key.length == 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 this
«EXPAND annotation FOREACH eAnnotations.select(a | a.source == 'annotation').details
«javaVisibility.toString().toLowerCase()» «wrapIfCollection(this «name-»;
«ENDDEFINE»
«DEFINE reference FOR ecore::EReference
«EXPAND generatedComment FOR this
«EXPAND annotation FOREACH eAnnotations.select(a | a.source == 'annotation').details
private «wrapIfCollection(this «name-»;
«ENDDEFINE»
«DEFINE method FOR java::Method
«EXPAND generatedComment FOR this
«EXPAND annotation FOREACH eAnnotations.select(a | a.source == 'annotation').details
«javaVisibility.toString().toLowerCase()-» «wrapIfCollection(this «name-»(«EXPAND parameter FOREACH parameters SEPARATOR ','») {
«EXPAND block FOR source»
}
«ENDDEFINE»
«DEFINE parameter FOR java::JavaParameter
«wrapIfCollection(this «name
«ENDDEFINE»
«DEFINE block FOR java::Block
«this.source
«EXPAND block FOREACH contents
«ENDDEFINE»
«DEFINE block FOR java::Comment
/*
* «this.source»
*/
«EXPAND block FOREACH contents
«ENDDEFINE»
«DEFINE generatedComment FOR Object
/**
*@generated
*/
«ENDDEFINE»
«DEFINE import FOR java::JavaClass
import «this.fullyQualifiedName() + ";\n"
«ENDDEFINE»
«DEFINE additions FOR java::JavaClass-»«ENDDEFINE»