1group model; 2 3ElementType(element) ::= << 4$({$element.class.simpleName$})(element = element)$ 5>> 6 7Modifier(element) ::= << 8$element$ 9>> 10 11SigAnnotation(element) ::= << 12@$ElementType(element = element.type)$ 13$if(element.elements)$ 14{$element.elements:{$SigAnnotationElement(element=it)$}$} 15$endif$ 16>> 17 18SigAnnotationElement(element) ::= << 19$element.declaringField.name$=$element.value$ 20>> 21 22SigAnnotationField(element) ::= << 23$SigField(element = element)$ $if(element.defaultValue)$ default=$element.defaultValue$$endif$ 24>> 25 26SigArrayType(element) ::= << 27$ElementType(element = element.componentType)$[] 28>> 29 30 31SigClassDefinition(element) ::= << 32$Annotations(element = element)$ 33$Modifiers(element = element)$$element.kind$ $element:ClassReferenceLink(link_style="discreet")$ 34$TypeParameters(element = element)$ 35$if(element.superClass)$ extends $ElementType(element=element.superClass)$$endif$ 36$if(element.interfaces)$ implements $element.interfaces:{$ElementType(element=it)$}; separator=", "$$endif$ 37>> 38 39ClassReferenceProjection(element) ::= << 40$SigClassReference(element= element)$ 41>> 42 43SigClassReference(element) ::= << 44$ClassReferenceLink(it = element.classDefinition, link_style="discreet")$ 45>> 46 47SigConstructor(element) ::= << 48$Annotations(element= element, separator=" ")$ 49$Modifiers(element= element)$ 50$TypeParameters(element= element)$ 51$SigExecutableMember(element= element)$ 52>> 53 54//FIXME add SigEnumConstantReference to format correct in either case 55SigEnumConstant(element) ::= << 56enum constant $ElementType(element=element.type)$.$element.name$ 57>> 58 59SigExecutableMember(element) ::= << 60$element.name$($element.parameters:{$SigParameter(element=it)$}; separator=", "$) 61$if(element.exceptions)$ throws $element.exceptions:{$ElementType(element=it)$}; separator=", "$$endif$ 62>> 63 64SigField(element) ::= << 65$Annotations(element = element, separator="<br/>")$ 66$Modifiers(element = element)$$ElementType(element=element.type)$ $element.name$ 67>> 68 69MethodProjection(element) ::= << 70$SigMethod(element=element)$ 71>> 72 73SigMethod(element) ::= << 74$Annotations(element=element)$ 75$Modifiers(element=element)$ 76$TypeParameters(element=element)$ 77$ElementType(element=element.returnType)$ $SigExecutableMember(element = element)$ 78>> 79 80SigPackage(element) ::= << 81$element.name$ 82>> 83 84SigParameter(element) ::= << 85$Annotations(element = element, separator=" ")$ 86$ElementType(element=element.type)$ 87>> 88 89ParameterizedTypeProjection(element) ::= << 90$SigParameterizedType(element = element)$ 91>> 92 93SigParameterizedType(element) ::= << 94$if(element.ownerType)$$ElementType(element=element.ownerType)$$endif$ 95$SigClassReference(element=element.rawType)$ 96$if(element.typeArguments)$<$element.typeArguments:{$ElementType(element=it)$}$>$endif$ 97>> 98 99SigPrimitiveType(element) ::= << 100$element.name$ 101>> 102 103SigTypeVariableDefinition(element) ::= << 104$element.name$$if(!element.upperBounds.empty)$ extends $element.upperBounds:{$ElementType(element=it)$}; separator=", "$$endif$ 105>> 106 107SigTypeVariableReference(element) ::= << 108$element.typeVariableDefinition.name$ 109>> 110 111SigWildcardType(element) ::= << 112? 113$if(element.lowerBound)$ super $ElementType(element=element.lowerBound)$$endif$ 114$if(!element.upperBounds.empty)$ extends $element.upperBounds:{$ElementType(element=it)$}; separator=", "$$endif$ 115>> 116 117 118/* helper templates*/ 119 120Modifiers(element) ::= << 121$if(element.modifiers)$ 122$element.modifiers; separator=" "$$\ $ 123$endif$ 124>> 125 126Annotations(element, separator) ::= << 127$if(element.annotations)$ 128$element.annotations:{$SigAnnotation(element=it)$}; separator=separator$ 129$separator$ 130$endif$ 131>> 132 133TypeParameters(element) ::= << 134$if(element.typeParameters)$ <$element.typeParameters:{$SigTypeVariableDefinition(element=it)$}; separator=", "$>$endif$ 135>> 136