Tabnine Logo
ResponseMeta.setJavaType
Code IndexAdd Tabnine to your IDE (free)

How to use
setJavaType
method
in
org.apache.servicecomb.swagger.invocation.response.ResponseMeta

Best Java code snippets using org.apache.servicecomb.swagger.invocation.response.ResponseMeta.setJavaType (Showing top 6 results out of 315)

origin: apache/servicecomb-java-chassis

protected void initSuccessResponse(Type returnType) {
 ResponseMeta successResponse = new ResponseMeta();
 successResponse.setJavaType(TypeFactory.defaultInstance().constructType(returnType));
 responseMap.put(Status.OK.getStatusCode(), successResponse);
}
origin: apache/servicecomb-java-chassis

protected void initInternalErrorResponse() {
 ResponseMeta internalErrorResponse = new ResponseMeta();
 internalErrorResponse.setJavaType(COMMON_EXCEPTION_JAVA_TYPE);
 responseMap.putIfAbsent(ExceptionFactory.CONSUMER_INNER_STATUS_CODE, internalErrorResponse);
 responseMap.putIfAbsent(ExceptionFactory.PRODUCER_INNER_STATUS_CODE, internalErrorResponse);
}
origin: apache/servicecomb-java-chassis

public void init(SwaggerToClassGenerator swaggerToClassGenerator, Operation operation, Type returnType) {
 initSuccessResponse(returnType);
 initGlobalDefaultMapper();
 for (Entry<String, Response> entry : operation.getResponses().entrySet()) {
  if ("default".equals(entry.getKey())) {
   defaultResponse = new ResponseMeta();
   defaultResponse.init(swaggerToClassGenerator, entry.getValue());
   continue;
  }
  Integer statusCode = Integer.parseInt(entry.getKey());
  ResponseMeta responseMeta = responseMap.computeIfAbsent(statusCode, k -> new ResponseMeta());
  responseMeta.init(swaggerToClassGenerator, entry.getValue());
 }
 initInternalErrorResponse();
 if (defaultResponse == null) {
  // swagger中没有定义default,加上default专用于处理exception
  ResponseMeta responseMeta = new ResponseMeta();
  responseMeta.setJavaType(OBJECT_JAVA_TYPE);
  defaultResponse = responseMeta;
 }
}
origin: org.apache.servicecomb/swagger-invocation-core

protected void initSuccessResponse(Type returnType) {
 ResponseMeta successResponse = new ResponseMeta();
 successResponse.setJavaType(TypeFactory.defaultInstance().constructType(returnType));
 responseMap.put(Status.OK.getStatusCode(), successResponse);
}
origin: org.apache.servicecomb/swagger-invocation-core

protected void initInternalErrorResponse() {
 ResponseMeta internalErrorResponse = new ResponseMeta();
 internalErrorResponse.setJavaType(COMMON_EXCEPTION_JAVA_TYPE);
 responseMap.putIfAbsent(ExceptionFactory.CONSUMER_INNER_STATUS_CODE, internalErrorResponse);
 responseMap.putIfAbsent(ExceptionFactory.PRODUCER_INNER_STATUS_CODE, internalErrorResponse);
}
origin: org.apache.servicecomb/swagger-invocation-core

public void init(SwaggerToClassGenerator swaggerToClassGenerator, Operation operation, Type returnType) {
 initSuccessResponse(returnType);
 initGlobalDefaultMapper();
 for (Entry<String, Response> entry : operation.getResponses().entrySet()) {
  if ("default".equals(entry.getKey())) {
   defaultResponse = new ResponseMeta();
   defaultResponse.init(swaggerToClassGenerator, entry.getValue());
   continue;
  }
  Integer statusCode = Integer.parseInt(entry.getKey());
  ResponseMeta responseMeta = responseMap.computeIfAbsent(statusCode, k -> new ResponseMeta());
  responseMeta.init(swaggerToClassGenerator, entry.getValue());
 }
 initInternalErrorResponse();
 if (defaultResponse == null) {
  // swagger中没有定义default,加上default专用于处理exception
  ResponseMeta responseMeta = new ResponseMeta();
  responseMeta.setJavaType(OBJECT_JAVA_TYPE);
  defaultResponse = responseMeta;
 }
}
org.apache.servicecomb.swagger.invocation.responseResponseMetasetJavaType

Popular methods of ResponseMeta

  • getJavaType
  • <init>
  • init

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • startActivity (Activity)
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JTable (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now