当前位置: 首页>>代码示例>>Java>>正文


Java MethodDoc.overriddenMethod方法代码示例

本文整理汇总了Java中com.sun.javadoc.MethodDoc.overriddenMethod方法的典型用法代码示例。如果您正苦于以下问题:Java MethodDoc.overriddenMethod方法的具体用法?Java MethodDoc.overriddenMethod怎么用?Java MethodDoc.overriddenMethod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.javadoc.MethodDoc的用法示例。


在下文中一共展示了MethodDoc.overriddenMethod方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processAnnotationDubboInterfaces

import com.sun.javadoc.MethodDoc; //导入方法依赖的package包/类
protected LinkedList<String> processAnnotationDubboInterfaces(ClassDoc[] classes) {
	LinkedList<String> result = new LinkedList<String>();
	for (int i = 0; i < classes.length; i++) {
		// implementation class which used com.alibaba.dubbo.config.annotation.Service 
		if(isDubboService(classes[i])) {
			for(ClassDoc interfaceClassDoc : classes[i].interfaces()) {
				result.add(interfaceClassDoc.qualifiedName());
				// mapping the method in interface to the method in implementation class
				for(MethodDoc implMethodDoc : classes[i].methods()) {
					MethodDoc overriddenMethod = implMethodDoc.overriddenMethod();
					if(overriddenMethod != null) {
						methodMap.put(overriddenMethod, implMethodDoc);
					} else {
						//It seems that MethodDoc.overriddenMethod() doesn't work, but MethodDoc.overrides() works fine.
						for(MethodDoc interfaceMethodDoc : interfaceClassDoc.methods()) {
							if(implMethodDoc.overrides(interfaceMethodDoc)) {
								methodMap.put(interfaceMethodDoc, implMethodDoc);
							}
						}
					}
				}
			}
		}
	}
	return result;
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:27,代码来源:DubboDocBuilder.java

示例2: processMethodDoc

import com.sun.javadoc.MethodDoc; //导入方法依赖的package包/类
/**
 * @return the full JSON for the given MethodDoc
 */
protected JSONObject processMethodDoc(MethodDoc methodDoc) {
    
    if (methodDoc == null) {
        return null;
    }
    
    JSONObject retMe = processExecutableMemberDoc(methodDoc);

    retMe.put("returnType", processType(methodDoc.returnType()));
    retMe.put("overriddenMethod", processMethodDocStub(methodDoc.overriddenMethod() ) );
    retMe.put("overriddenType", processTypeStub(methodDoc.overriddenType() ) );
    MethodDoc specifiedByMethodDoc = getSpecifiedByMethod(methodDoc);
    retMe.put("specifiedByMethod", processMethodDocStub( specifiedByMethodDoc ) );
    
    if (methodDoc.overriddenMethod() != null || specifiedByMethodDoc != null) {
        inheritDoc(retMe, methodDoc, specifiedByMethodDoc);
    }
    
    return retMe;
}
 
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:24,代码来源:JsonDoclet.java

示例3: getInheritedCommentText

import com.sun.javadoc.MethodDoc; //导入方法依赖的package包/类
/**
 * Resolve inherited comment text by scanning up the methodDoc's inheritance chain,
 * resolving any {@inheritDoc} encountered along the way.
 *
 * This method returns as soon as it finds a non-empty commentText with all {@inheritDoc}
 * tags resolved.
 * 
 * @return the comment text for the given methodDoc, all inheritance resolved.
 */
protected String getInheritedCommentText(MethodDoc methodDoc, MethodDoc specifiedByMethodDoc) {

    String retMe = null;
    
    for ( ;
         methodDoc != null && (StringUtils.isEmpty(retMe) || retMe.contains(JsonDoclet.InheritDocTag) );
         methodDoc = methodDoc.overriddenMethod() ) {

        retMe = resolveInheritDoc(retMe, methodDoc.commentText() );
    }
    
    // Inherit from the interface
    retMe = resolveInheritDoc(retMe, (specifiedByMethodDoc != null) ? specifiedByMethodDoc.commentText() : null);

    return retMe;
}
 
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:26,代码来源:JsonDoclet.java

示例4: getInheritedReturnTagText

import com.sun.javadoc.MethodDoc; //导入方法依赖的package包/类
/**
 * Resolve inherited @return tag text by scanning up the methodDoc's inheritance chain,
 * resolving any {@inheritDoc} encountered along the way.
 *
 * This method returns as soon as it finds a non-empty @return tag text with all {@inheritDoc}
 * tags resolved.
 *
 * Note: the logic of this method is exactly the same as getInheritedCommentText.
 *       The only difference is the value we're retrieving from the methodDoc (@return tag
 *       text vs commentText).
 * 
 * @return the @return tag text for the given methodDoc, all inheritance resolved.
 */
protected String getInheritedReturnTagText(MethodDoc methodDoc, MethodDoc specifiedByMethodDoc) {

    String retMe = null;
    
    for ( ;
         methodDoc != null && (StringUtils.isEmpty(retMe) || retMe.contains(JsonDoclet.InheritDocTag) );
         methodDoc = methodDoc.overriddenMethod() ) {
        
        retMe = resolveInheritDoc(retMe, getReturnTagText( methodDoc ) );
    }
    
    // Inherit from the interface
    retMe = resolveInheritDoc(retMe, getReturnTagText( specifiedByMethodDoc) );
    
    return retMe;
}
 
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:30,代码来源:JsonDoclet.java

示例5: getInheritedParamTagComment

import com.sun.javadoc.MethodDoc; //导入方法依赖的package包/类
/**
 * Resolve inherited @param tag text by scanning up the methodDoc's inheritance chain,
 * resolving any {@inheritDoc} encountered along the way.
 *
 * This method returns as soon as it finds a non-empty @param tag text with all {@inheritDoc}
 * tags resolved.
 *
 * Note: the logic of this method is exactly the same as getInheritedCommentText.
 *       The only difference is the value we're retrieving from the methodDoc (@param tag
 *       text vs commentText).
 * 
 * @return the @param tag text for the given methodDoc, all inheritance resolved.
 */
protected String getInheritedParamTagComment(MethodDoc methodDoc, String parameterName, MethodDoc specifiedByMethodDoc) {

    String retMe = null;
    
    for ( ;
         methodDoc != null && (StringUtils.isEmpty(retMe) || retMe.contains(JsonDoclet.InheritDocTag) );
         methodDoc = methodDoc.overriddenMethod() ) {

        retMe = resolveInheritDoc(retMe, getParamTagComment( methodDoc, parameterName ));
    }
    
    // Inherit from the interface
    retMe = resolveInheritDoc(retMe, getParamTagComment( specifiedByMethodDoc, parameterName) );
    
    return retMe;
}
 
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:30,代码来源:JsonDoclet.java

示例6: getInheritedParamTag

import com.sun.javadoc.MethodDoc; //导入方法依赖的package包/类
/**
 * @return the first non-null ParamTag with the given parameterName in the inheritance tree
 *         for the given methodDoc.
 */
protected ParamTag getInheritedParamTag(MethodDoc methodDoc, String parameterName, MethodDoc specifiedByMethodDoc)  {

    for ( ;
         methodDoc != null;
         methodDoc = methodDoc.overriddenMethod() ) {

        ParamTag retMe = getParamTag( methodDoc.paramTags(), parameterName );
        if (retMe != null) {
            return retMe;
        }
    }
    
    // Couldn't find it in the superclass hierarchy. Check the interface method
    return (specifiedByMethodDoc != null) ? getParamTag( specifiedByMethodDoc.paramTags(), parameterName ) : null;
}
 
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:20,代码来源:JsonDoclet.java

示例7: toMethods

import com.sun.javadoc.MethodDoc; //导入方法依赖的package包/类
/**
 * Transforms an array of methods and an array of constructor methods into XML and adds those to the host node.
 *
 * @param methods The methods.
 * @param constructors The constructors.
 * @param node The node to add the XML to.
 */
private static XMLNode toMethods(MethodDoc[] methods) {
  if (methods.length < 1) return null;

  // Create the <methods> node
  XMLNode node = new XMLNode("methods");

  // Add the <method> nodes
  for (MethodDoc method : methods) {
    XMLNode methodNode = new XMLNode("method");

    updateExecutableMemberNode(method, methodNode);

    methodNode.attribute("type",     method.returnType().typeName());
    methodNode.attribute("fulltype", method.returnType().toString());
    methodNode.attribute("dimension", method.returnType().dimension());
    methodNode.attribute("abstract", method.isAbstract());
    methodNode.attribute("varargs", method.isVarArgs());

    MethodDoc overrides = method.overriddenMethod();
    if (overrides != null) {
      methodNode.attribute("overrides", overrides.toString());
    }

    Tag[] returnTags = method.tags("@return");
    if (returnTags.length > 0) {
      XMLNode returnNode = new XMLNode("returns");
      returnNode.text(toComment(returnTags[0]));
      methodNode.child(returnNode);
    }

    // standard block tags
    methodNode.child(toStandardTags(method));

    // Deprecated
    toDeprecated(method, methodNode);

    node.child(methodNode);
  }

  return node;
}
 
开发者ID:bazooka,项目名称:bazooka-wo-xmldoclet,代码行数:49,代码来源:XMLDoclet.java

示例8: isNotInherited

import com.sun.javadoc.MethodDoc; //导入方法依赖的package包/类
/**
 * 
 * @param methodDoc
 * @return
 */
private boolean isNotInherited(final MethodDoc methodDoc) {
	return methodDoc.overriddenMethod() == null;
}
 
开发者ID:Faylixe,项目名称:marklet,代码行数:9,代码来源:ClassPageBuilder.java


注:本文中的com.sun.javadoc.MethodDoc.overriddenMethod方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。