Regarding interfaces, all members of interfaces are implicitly public. The conclusion is: "public" keyword is unneeded.
Regards Diogo http://www.infospheres.caltech.edu/resources/langspec-1.0/9.doc.html Quote .1.5 Access to Interface Member Names All interface members are implicitly public. They are accessible outside the package where the interface is declared if the interface is also declared public and the package containing the interface is accessible as described in §7.1. http://java.sun.com/docs/books/tutorial/java/interpack/interfaceDef.html The Interface Body The interface body contains method declarations for all the methods included in the interface. A method declaration within an interface is followed by a semicolon (;) because an interface does not provide implementations for the methods declared within it. All methods declared in an interface are implicitly public and abstract. ----------------------------------- Diogo Bacelar Quintela EF - Tecnologias de Informação, Lda. Av. António Serpa, 26 - 4º Dto. 1050-027 Lisboa, Portugal Tel: (+351) 217 827 800 Fax: (+351) 217 827 830 Email: [EMAIL PROTECTED] PGP: 0xF51A5AB9 ________________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joris Wijlens Sent: terça-feira, 22 de Novembro de 2005 12:34 To: [email protected] Subject: [xdoclet-plugins-interest] EJB interface generation no modifiers Hi, When I generate an interface for an EJB class with xdoclet2 it generates: // Generated file. Do not edit. // Generated by org.xdoclet.plugin.ejb.interfaces.LocalInterfacePlugin from output.servicelayer.ExampleService package output.servicelayer; public interface ExampleServiceLocal extends javax.ejb.EJBLocalObject { void method(); void methodOne() throws java.lang.Exception; java.lang.String methodTwo(java.lang.String two); } Xdoclet 1 generates this: /* * Generated by XDoclet - Do not edit! */ package output.servicelayer; /** * Local interface for ExampleService. * @xdoclet-generated at 18-11-05 */ public interface ExampleServiceLocal extends javax.ejb.EJBLocalObject { public void method( ) ; public void methodOne( ) throws java.lang.Exception; public java.lang.String methodTwo( java.lang.String two ) ; } Why does XDoclet2 leave my modifiers out? My methods are not public anymore. When I look at the lines of the velocity file for generating the interface they look like this #foreach( $method in $plugin.getInterfaceMethods($class) ) $method.getDeclarationSignature(false); #end shouldn't this be: #foreach( $method in $plugin.getInterfaceMethods($class) ) $method.getDeclarationSignature(true); #end Or am I jumping conclusions now. Thanks anyway, Joris Wijlens
smime.p7s
Description: S/MIME cryptographic signature
