この注釈がどのように呼び出されるかを理解しようとしています @WebMethod
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@WebService //<----- is this annotation nested in WebService class
@SOAPBinding(style = Style.RPC)
public interface TimeServer {
@WebMethod String getTimeAsString(); //<-------is this nested in a class too
@WebMethod long getTimeAsElapsed();
}
私のインポートjavax.jws.WebMethodによると、Javaドキュメント
http://docs.oracle.com/javase/7/docs/api/javax/jws/WebMethod.html
public @interface WebMethod
に記載されています。
@WebMethod アノテーションは WebMethod クラスとして定義されていますか?
WebMethod クラスのソース コードは次のようなものでしょうか。
Public class WebMethod{
//members
//methods
public @interface WebMethod{ //annotation definition in class, is this possible
}
}
そうでない場合は、簡単な例でどのように行うか教えてください。