When a Javadoc comment is present, the source
range begins with the first character of the "/**" comment delimiter.
When there is no Javadoc comment, the source range begins with the first
character of the first modifier keyword (if modifiers), or the
first character of the "<" token (method, no modifiers, type parameters),
or the first character of the return type (method, no modifiers, no type
parameters), or the first character of the identifier (constructor,
no modifiers). The source range extends through the last character of the
";" token (if no body), or the last character of the block (if body).
MethodDeclaration: [ Javadoc ] { Modifier } ( Type | void ) Identifier ( [ FormalParameter { , FormalParameter } ] ) {[ ] } [ throws TypeName { , TypeName } ] ( Block | ; ) ConstructorDeclaration: [ Javadoc ] { Modifier } Identifier ( [ FormalParameter { , FormalParameter } ] ) [throws TypeName { , TypeName } ] BlockFor JLS3, type parameters and reified modifiers (and annotations) were added:MethodDeclaration: [ Javadoc ] { ExtendedModifier } [ < TypeParameter { , TypeParameter } > ] ( Type | void ) Identifier ( [ FormalParameter { , FormalParameter } ] ) {[ ] } [ throws TypeName { , TypeName } ] ( Block | ; ) ConstructorDeclaration: [ Javadoc ] { ExtendedModifier } [ < TypeParameter { , TypeParameter } > ] Identifier ( [ FormalParameter { , FormalParameter } ] ) [throws TypeName { , TypeName } ] BlockWhen a Javadoc comment is present, the source range begins with the first character of the "/**" comment delimiter. When there is no Javadoc comment, the source range begins with the first character of the first modifier keyword (if modifiers), or the first character of the "<" token (method, no modifiers, type parameters), or the first character of the return type (method, no modifiers, no type parameters), or the first character of the identifier (constructor, no modifiers). The source range extends through the last character of the ";" token (if no body), or the last character of the block (if body).