|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
DefMethod
The public interface to a method definition AG element.
Example: def m(a, b) { a + b }
Method Summary | |
---|---|
Expression |
annotationExpression()
A method may have zero or more annotations. |
Table |
arguments()
A method may have zero, one or more formal arguments. |
Begin |
bodyExpression()
The body of a method may not be empty. |
Symbol |
selector()
The selector must be a literal symbol. |
Methods inherited from interface edu.vub.at.objects.AbstractGrammar |
---|
freeVariables |
Methods inherited from interface edu.vub.at.objects.Object |
---|
super |
Method Detail |
---|
Symbol selector()
`{ def m() { 5 } }.statements[1].selector == `m
Table arguments()
`{ def m(a, @b) { b } }.statements[1].arguments == `[a, @b]
Begin bodyExpression()
`{ def m(a, b) { a.n(); b+1 } }.statements[1].bodyExpression == `{ a.n(); b.+(1) }
Expression annotationExpression()
`{def m() @[Getter] { x }}.statements[1].annotations == `[Getter]
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |