Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-3
-
Fix Version/s: 1.0-rc-1
-
Component/s: stub generation
-
Labels:None
-
Number of attachments :
Description
Consider the following ...
public interface ExampleInterface { public void setExampleProperty(Object exampleProperty); }
And the following groovy class ...
class ExampleClass implements ExampleInterface {
def exampleProperty
}
This should work and does if you aren't using the joint compile stuff.
Issue Links
| This issue is duplicated by: | ||||
| MGROOVY-111 | Stub generation does not build implied getter/setter methods |
|
|
|
This also begs the question of what to do with the groovy doc :S
// MyClass.groovy
class MyClass {
/**
*/
def var = null
}
// Generated stub ...
public class MyClass extends Object {
/**
*/
public Object getVar() { throw new Error(); }
public void setVar(Object var) { throw new Error(); }
}
I think attaching the documentation to the getter makes sense. But what if the groovy class defines it's own getter with groovydoc comments?
- Some documentation here
*/
def var = null
} // Generated stub ... public class MyClass extends Object { /**- Some documentation here
*/
public Object getVar() { throw new Error(); }
public void setVar(Object var) { throw new Error(); }
}
I think attaching the documentation to the getter makes sense. But what if the groovy class defines it's own getter with groovydoc comments?