Class HandlerMethod
java.lang.Object
com.codename1.backend.web.HandlerMethod
The controller method a request was routed to, as interceptors and exception resolvers see it.
The build creates one per route, as a constant of the generated router, so reading it costs nothing per request. It names the method rather than holding a reflective handle: nothing in a translated backend can call a method by name, and nothing here needs to.
-
Constructor Summary
ConstructorsConstructorDescriptionHandlerMethod(String controllerClass, String methodName, String httpMethod, String pattern) -
Method Summary
Modifier and TypeMethodDescriptionThe binary name of the controller class, such ascom.example.Notes.The HTTP method the route is mapped to.The name of the handler method.The route template the request matched, such as/notes/{id}; never the concrete path.booleanisInPackage(String pkg) Whether the controller class is inpkgor one of its subpackages.toString()Returns a string representation of the object.
-
Constructor Details
-
HandlerMethod
- Parameters:
controllerClass- the binary name of the controller classmethodName- the name of the handler methodhttpMethod- the HTTP method the route is mapped topattern- the route template, such as/notes/{id}
-
-
Method Details
-
getControllerClass
The binary name of the controller class, such ascom.example.Notes. -
getMethodName
The name of the handler method. -
getHttpMethod
The HTTP method the route is mapped to. AGETroute also answersHEAD, and reportsGEThere when it does. -
getPattern
The route template the request matched, such as/notes/{id}; never the concrete path. -
isInPackage
Whether the controller class is inpkgor one of its subpackages.- Parameters:
pkg- a package name, such ascom.example.api- Returns:
- true when the controller is declared there
-
toString
Description copied from class:ObjectReturns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-