Returns the main <code>ApiDoc</code>, containing <code>ApiMethodDoc</code> and <code>ApiObjectDoc</code> objects
@return An <code>ApiDoc</code> object
552157
public JSONDoc getJSONDoc(String version, String basePath, List<String> packages, boolean playgroundEnabled, MethodDisplay displayMethodAs) {
		Set<URL> urls = new HashSet<URL>();
		FilterBuilder filter = new FilterBuilder();
		
		log.debug("Found " + packages.size() + " package(s) to scan...");
		for (String pkg : packages) {
			log.debug("Adding package to JSONDoc recursive scan: " + pkg);
			urls.addAll(ClasspathHelper.forPackage(pkg));
			filter.includePackage(pkg);
		}

		reflections = new Reflections(new ConfigurationBuilder().filterInputsBy(filter).setUrls(urls).addScanners(new MethodAnnotationsScanner()));
		
		JSONDoc jsondocDoc = new JSONDoc(version, basePath);
		jsondocDoc.setPlaygroundEnabled(playgroundEnabled);
		jsondocDoc.setDisplayMethodAs(displayMethodAs);
		
		jsondocControllers = jsondocControllers();
		jsondocObjects = jsondocObjects(packages);
		jsondocFlows = jsondocFlows();
		jsondocGlobal = jsondocGlobal();
		jsondocChangelogs = jsondocChangelogs();
		jsondocMigrations = jsondocMigrations();

		for (Class<?> clazz : jsondocObjects) {
			jsondocTemplates.put(clazz, JSONDocTemplateBuilder.build(clazz, jsondocObjects));
		}
		
		jsondocDoc.setApis(getApiDocsMap(jsondocControllers, displayMethodAs));
		jsondocDoc.setObjects(getApiObjectsMap(jsondocObjects));
		jsondocDoc.setFlows(getApiFlowDocsMap(jsondocFlows, allApiMethodDocs));
		jsondocDoc.setGlobal(getApiGlobalDoc(jsondocGlobal, jsondocChangelogs, jsondocMigrations));
		
		return jsondocDoc;
	}
432487
public AnnotationTypeElementDocImpl getAnnotationTypeElementDoc(
            MethodSymbol meth) {

        AnnotationTypeElementDocImpl result =
            (AnnotationTypeElementDocImpl)methodMap.get(meth);
        if (result != null) return result;
        result = new AnnotationTypeElementDocImpl(this, meth);
        methodMap.put(meth, result);
        return result;
    }
452902
public APIState getAPIState() {
		APIStateRequest request = new APIStateRequest();
		APIStateResponse response = resolveApitraryClient().send(request);

		APIState apiState = null;
		if (HttpStatus.OK.ordinal() == response.getStatusCode()) {
			String result = response.getResult();

			ObjectMapper objectMapper = new ObjectMapper();
			try {
				apiState = objectMapper.readValue(result, APIState.class);
			} catch (Exception e) {
				throw new MappingException(e);
			}
		} else {
			throw new CommunicationErrorException(HttpStatus.getStatus(response.getStatusCode()));
		}
		return apiState;
	}
222001
private String getMethod() {
        String methods = this.metadataJson.getString(METHODS);
        if (methods.contains(HttpMethod.POST.name())) { 
            return HttpMethod.POST.name();
        }
        else if (methods.contains(HttpMethod.PUT.name())) {
            return HttpMethod.PUT.name();
        }
        else {
            return methods;
        }
    }
990195
public MethodDoc[] serializationMethods() {
        if (serializedForm == null) {
            serializedForm = new SerializedForm(env, tsym, this);
        }
        //### Clone this?
        return serializedForm.methods();
    }
828550
@GET
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/help")
    public Map<String, List<? extends Object>> help() {
        Map<String, List<?>> result = new LinkedHashMap<>();
        List<EndpointHelpDto> endpoints = describeEndpoints(getEndpoints());

        if (endpoints != null && !endpoints.isEmpty()) {
            result.put("endpoints", endpoints);
        }

        List<MethodHelpDto> methods = describeMethods();

        if (methods != null && !methods.isEmpty()) {
            result.put("methods", methods);
        }
        return result;
    }
1180676
public static ApiOvhCore getInstance() {
		ApiOvhCore core = new ApiOvhCore();
		// core._consumerKey = core.config.getConsumerKey();
		core._consumerKey = core.getConsumerKeyOrNull();// config.getConsumerKey();
		if (core._consumerKey == null) {
			File file = ApiOvhConfigBasic.getOvhConfig();
			String location = ApiOvhConfigBasic.configFiles;
			if (file != null)
				location = file.getAbsolutePath();
			String url = "";
			String CK = "";
			try {
				OvhCredential credential = core.requestToken(null);
				url = credential.validationUrl;
				CK = credential.consumerKey;
			} catch (Exception e) {
				log.error("Fail to request a new Credential", e);
			}
			log.error("activate the CK {} here: {}", CK, url);
			throw new NullPointerException("no 'consumer_key' present in " + location
					+ " or environement 'OVH_CONSUMER_KEY', activate the CK '" + CK + "' here: " + url);
		}
		return core;
	}
45729
public Method createObjectMethod(Object ownerClass, String methodName,
            Class[] paramTypes) {
        Method m = null;
        try {
            m = ownerClass.getClass().getMethod(methodName, paramTypes);
        } catch (NoSuchMethodException nsme) {
            String errS = " NoSuchMethod:" + methodName + " in className:"
                    + ownerClass.getClass().getName() + " or method's args type error";
            Debug.logError(errS, module);
        } catch (Exception ex) {
            Debug.logError("[JdonFramework] createMethod error:" + ex, module);
        }
        return m;
    }
989572
public JMethod []getDeclaredMethods()
  {
    SoftReference<JMethod[]> jMethodsRef = _declaredMethodsRef;
    JMethod []jMethods = null;

    if (jMethodsRef != null) {
      jMethods = jMethodsRef.get();
      if (jMethods != null)
        return jMethods;
    }

    Method []methods = _class.getDeclaredMethods();
    
    jMethods = new JMethod[methods.length];

    for (int i = 0; i < methods.length; i++) {
      jMethods[i] = new JMethodWrapper(methods[i], getClassLoader());
    }

    _declaredMethodsRef = new SoftReference<JMethod[]>(jMethods);

    return jMethods;
  }
189320
@Override
  public AnnotatedType api()
  {
    ServiceRefAmp delegate = delegate();
    
    if (delegate == null) {
      System.out.println("FAILED_DELEGATE: " + this);
    }
    
    return delegate().api();
  }
155167
public DBObject toDBObject() {
        DBObject dbObject = new BasicDBObject();
        if (granularity != null) {
            dbObject.put("granularity", granularity.getGranulality());
        }

        DBObject output = new BasicDBObject();
        for (Map.Entry<String, Accumulator> entry : accumulators.entrySet()) {
            output.put(entry.getKey(), entry.getValue().toDBObject());
        }
        if (!accumulators.isEmpty()) {
            dbObject.put("output", output);
        }

        return dbObject;
    }
599452
function() {
  // Start docs section with DOCS_START_MARKER
  var docs = [
    DOCS_START_MARKER
  ];

  // Generate documentation for methods
  // Sort by api name: http://bugzil.la/1200519
  docs = docs.concat(_.keys(apis).sort().filter(function(name) {
      // Find component that hold functions
      return apis[name].reference.entries.some(function(entry) {
        return entry.type === 'function';
      });
    }).map(function(name) {
    var api = apis[name];
    return [
      "",
      "### Methods in `taskcluster." + name + "`",
      "```js",
      "// Create " + name + " client instance:",
      "//  - " + api.reference.baseUrl,
      "var " + instanceName(name) + " = new taskcluster." + name + "(options);",
      "```"
    ].concat(api.reference.entries.filter(function(entry) {
      return entry.type === 'function';
    }).map(function(entry) {
      var args = entry.args.slice();
      if (entry.input) {
        args.push('payload');
      }
      if ((entry.query || []).length > 0) {
        args.push('[options]');
      }
      var retval = 'void';
      if (entry.output) {
        retval = 'result';
      }
      return " * `" + instanceName(name) + "." + entry.name +
             "(" + args.join(', ') + ") : " + retval + "`";
    })).join('\n');
  }));


  // Generate documentation for exchanges
  // Sort by exchange name: http://bugzil.la/1200519
  docs = docs.concat(_.keys(apis).sort().filter(function(name) {
      // Find component that hold functions
      return apis[name].reference.entries.some(function(entry) {
        return entry.type === 'topic-exchange';
      });
    }).map(function(name) {
    var api = apis[name];
    return [
      "",
      "### Exchanges in `taskcluster." + name + "`",
      "```js",
      "// Create " + name + " client instance:",
      "//  - " + api.reference.exchangePrefix,
      "var " + instanceName(name) + " = new taskcluster." + name + "(options);",
      "```"
    ].concat(api.reference.entries.filter(function(entry) {
      return entry.type === 'topic-exchange';
    }).map(function(entry) {
      return " * `" + instanceName(name) + "." + entry.name +
             "(routingKeyPattern) : binding-info`";
    })).join('\n');
  }));

  // End the docs section with DOCS_END_MARKER
  docs = docs.concat([
    "",
    DOCS_END_MARKER
  ]).join('\n');

  // Load README.md
  var readmePath  = path.join(__dirname, '..', 'README.md');
  var readme      = fs.readFileSync(readmePath, {encoding: 'utf-8'});

  // Split out docs and get text before and after docs, and write to readmeMD
  var before  = readme.split(DOCS_START_MARKER)[0]
  var after   = readme.split(DOCS_END_MARKER)[1];
  fs.writeFileSync(readmePath, before + docs + after, {encoding: 'utf-8'});
}
1071879
public ApiResponse<GetExportStatisticDefinitions> getExportStatisticDefinitionsWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = getExportStatisticDefinitionsValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<GetExportStatisticDefinitions>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
143961
protected MainMethodRunner createMainMethodRunner(String mainClass, String[] args,
			ClassLoader classLoader) {
		return new MainMethodRunner(mainClass, args);
	}
858649
public final Method getMetaInfo() {
		for(Class<?> c=getClass(); c != null; c=c.getSuperclass()) {
			Method a = c.getAnnotation(Method.class);
			if(a != null) {
				return a;
			}
		}
		
		throw new IllegalArgumentException("Neither "+getClass()+" nor its superclasses are annotated with "+Method.class);
	}
325416
public FacesConfigFlowDefinitionFacesMethodCallType<FacesConfigFlowDefinitionType<T>> getOrCreateMethodCall()
   {
      List<Node> nodeList = childNode.get("method-call");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigFlowDefinitionFacesMethodCallTypeImpl<FacesConfigFlowDefinitionType<T>>(this, "method-call", childNode, nodeList.get(0));
      }
      return createMethodCall();
   }
1236304
public MethodDocImpl getMethodDoc(MethodSymbol meth) {
        assert !meth.isConstructor() : "not expecting a constructor symbol";
        MethodDocImpl result = (MethodDocImpl)methodMap.get(meth);
        if (result != null) return result;
        result = new MethodDocImpl(this, meth);
        methodMap.put(meth, result);
        return result;
    }