1 group model; 2 3 ElementType(element) ::= << 4 $({$element.class.simpleName$})(element = element)$ 5 >> 6 7 Modifier(element) ::= << 8 $element$ 9 >> 10 11 SigAnnotation(element) ::= << 12 @$ElementType(element = element.type)$ 13 $if(element.elements)$ 14 {$element.elements:{$SigAnnotationElement(element=it)$}$} 15 $endif$ 16 >> 17 18 SigAnnotationElement(element) ::= << 19 $element.declaringField.name$=$element.value$ 20 >> 21 22 SigAnnotationField(element) ::= << 23 $SigField(element = element)$ $if(element.defaultValue)$ default=$element.defaultValue$$endif$ 24 >> 25 26 SigArrayType(element) ::= << 27 $ElementType(element = element.componentType)$[] 28 >> 29 30 31 SigClassDefinition(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 39 ClassReferenceProjection(element) ::= << 40 $SigClassReference(element= element)$ 41 >> 42 43 SigClassReference(element) ::= << 44 $ClassReferenceLink(it = element.classDefinition, link_style="discreet")$ 45 >> 46 47 SigConstructor(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 55 SigEnumConstant(element) ::= << 56 enum constant $ElementType(element=element.type)$.$element.name$ 57 >> 58 59 SigExecutableMember(element) ::= << 60 $element.name$($element.parameters:{$SigParameter(element=it)$}; separator=", "$) 61 $if(element.exceptions)$ throws $element.exceptions:{$ElementType(element=it)$}; separator=", "$$endif$ 62 >> 63 64 SigField(element) ::= << 65 $Annotations(element = element, separator="<br/>")$ 66 $Modifiers(element = element)$$ElementType(element=element.type)$ $element.name$ 67 >> 68 69 MethodProjection(element) ::= << 70 $SigMethod(element=element)$ 71 >> 72 73 SigMethod(element) ::= << 74 $Annotations(element=element)$ 75 $Modifiers(element=element)$ 76 $TypeParameters(element=element)$ 77 $ElementType(element=element.returnType)$ $SigExecutableMember(element = element)$ 78 >> 79 80 SigPackage(element) ::= << 81 $element.name$ 82 >> 83 84 SigParameter(element) ::= << 85 $Annotations(element = element, separator=" ")$ 86 $ElementType(element=element.type)$ 87 >> 88 89 ParameterizedTypeProjection(element) ::= << 90 $SigParameterizedType(element = element)$ 91 >> 92 93 SigParameterizedType(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 99 SigPrimitiveType(element) ::= << 100 $element.name$ 101 >> 102 103 SigTypeVariableDefinition(element) ::= << 104 $element.name$$if(!element.upperBounds.empty)$ extends $element.upperBounds:{$ElementType(element=it)$}; separator=", "$$endif$ 105 >> 106 107 SigTypeVariableReference(element) ::= << 108 $element.typeVariableDefinition.name$ 109 >> 110 111 SigWildcardType(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 120 Modifiers(element) ::= << 121 $if(element.modifiers)$ 122 $element.modifiers; separator=" "$$\ $ 123 $endif$ 124 >> 125 126 Annotations(element, separator) ::= << 127 $if(element.annotations)$ 128 $element.annotations:{$SigAnnotation(element=it)$}; separator=separator$ 129 $separator$ 130 $endif$ 131 >> 132 133 TypeParameters(element) ::= << 134 $if(element.typeParameters)$ <$element.typeParameters:{$SigTypeVariableDefinition(element=it)$}; separator=", "$>$endif$ 135 >> 136