コード例 #1
0
 @SuppressWarnings("unchecked")
 protected <T> T setParamater(Class<T> clazz, String parameterName, OvertownRequest request) {
   if (String.class.equals(clazz)) {
     return (T) request.getParameter(parameterName);
   }
   return null;
 }
コード例 #2
0
 @SuppressWarnings("unchecked")
 @Override
 public <T> T inject(Class<T> clazz, String parameterName, OvertownRequest cloverRequest) {
   return (T) cloverRequest.getExchange();
 }