本文整理汇总了Java中com.sun.javadoc.ExecutableMemberDoc类的典型用法代码示例。如果您正苦于以下问题:Java ExecutableMemberDoc类的具体用法?Java ExecutableMemberDoc怎么用?Java ExecutableMemberDoc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExecutableMemberDoc类属于com.sun.javadoc包,在下文中一共展示了ExecutableMemberDoc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateExecutableMemberNode
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
/**
* Set the commons attribute and child nodes for method and constructor nodes.
*
* @param member The executable member documentation.
* @param node The node to update
*/
private static void updateExecutableMemberNode(ExecutableMemberDoc member, XMLNode node) {
// Add the basic attribute values
node.attribute("name", member.name());
node.attribute("static", member.isStatic());
node.attribute("interface", member.isInterface());
node.attribute("final", member.isFinal());
node.attribute("visibility", getVisibility(member));
node.attribute("synchronized", member.isSynchronized());
node.attribute("synthetic", member.isSynthetic());
// Comment
node.child(toComment(member));
// Other objects attached to the method/constructor.
node.child(toTags(member));
node.child(toSeeNodes(member.seeTags()));
node.child(toParametersNode(member.parameters(), member.paramTags()));
node.child(toExceptionsNode(member.thrownExceptions(), member.throwsTags()));
}
示例2: linkedName
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
/**
* Appends to the current document a link that is
* built from the given ``element``. Such links is
* usually leading to the internal corresponding
* document section
*
* @param element Element to build link from.
*/
public void linkedName(final ProgramElementDoc element) {
final StringBuffer anchorBuilder = new StringBuffer()
.append('#')
.append(element.name());
if (element instanceof ExecutableMemberDoc) {
final ExecutableMemberDoc member = (ExecutableMemberDoc) element;
final Parameter[] parameters = member.parameters();
if (parameters.length == 0) { // Empty constructor case.
}
for (int i = 0; i < parameters.length; i++) {
anchorBuilder.append(parameters[i].type().simpleTypeName());
if (i < parameters.length - 1) {
anchorBuilder.append('-');
}
}
}
final String url = anchorBuilder.toString().toLowerCase();
link(element.name(), url);
}
示例3: processExecutableMemberDoc
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
/**
* @return the full JSON for the given ExecutableMemberDoc
*/
protected JSONObject processExecutableMemberDoc(ExecutableMemberDoc emDoc) {
JSONObject retMe = processMemberDoc(emDoc);
retMe.put("flatSignature", emDoc.flatSignature());
retMe.put("signature", emDoc.signature());
retMe.put("parameters", processParameters(emDoc.parameters()));
retMe.put("paramTags", processParamTags(emDoc.paramTags()));
retMe.put("thrownExceptions", processClassDocStubs(emDoc.thrownExceptions()));
retMe.put("thrownExceptionTypes", processTypes(emDoc.thrownExceptionTypes()));
retMe.put("typeParameters", processTypeVariables(emDoc.typeParameters()));
retMe.put("typeParamTags", processParamTags(emDoc.typeParamTags()));
retMe.put("throwsTags", processThrowsTags(emDoc.throwsTags()));
return retMe;
}
示例4: updateExecutableMemberNode
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
/**
* Set the commons attribute and child nodes for method and constructor nodes.
*
* @param member The executable member documentation.
* @param node The node to update
*/
private static void updateExecutableMemberNode(ExecutableMemberDoc member, XMLNode node) {
// Add the basic attribute values
node.attribute("name", member.name());
node.attribute("static", member.isStatic());
node.attribute("interface", member.isInterface());
node.attribute("final", member.isFinal());
node.attribute("visibility", getVisibility(member));
node.attribute("synchronized", member.isSynchronized());
node.attribute("synthetic", member.isSynthetic());
// Comments
node.child(toShortComment(member));
node.child(toComment(member));
// Other objects attached to the method/constructor.
node.child(toTags(member));
node.child(toSeeNodes(member.seeTags()));
node.child(toParametersNode(member.parameters(), member.paramTags(), member.isVarArgs()));
node.child(toExceptionsNode(member.thrownExceptionTypes(), member.throwsTags()));
}
示例5: getReturnType
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
private static Type getReturnType(ExecutableMemberDoc method) {
if (method instanceof MethodDoc) {
MethodDoc m = (MethodDoc) method;
return m.returnType();
}
return null;
}
示例6: doesOverride
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
private boolean doesOverride(ExecutableMemberDoc method) {
if (method.isConstructor()) {
return true;
}
ClassDoc clazz = method.containingClass();
int parameterCount = method.parameters().length;
return foundMethod(clazz, false, method.name(), parameterCount);
}
示例7: isDeprecated
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
private static boolean isDeprecated(ExecutableMemberDoc method) {
for (Tag t : method.tags()) {
if (t.kind().equals("@deprecated")) {
return true;
}
}
return false;
}
示例8: getThrownExceptions
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
protected SortedSet getThrownExceptions(ExecutableMemberDoc execMemberDoc)
{
SortedSet result = new TreeSet();
ClassDoc[] thrownExceptions = execMemberDoc.thrownExceptions();
for (int j=0; j<thrownExceptions.length; ++j) {
result.add(thrownExceptions[j]);
}
return result;
}
示例9: rowSignature
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
/**
* Appends to the current document the signature
* of the given ``member`` as a table row.
*
* @param element Member to write signature from.
*/
public void rowSignature(final ProgramElementDoc element) {
startTableRow();
returnSignature(element);
cell();
linkedName(element);
if (element instanceof ExecutableMemberDoc) {
final ExecutableMemberDoc member = (ExecutableMemberDoc) element;
inlineParameters(member.parameters());
}
endTableRow();
newLine();
}
示例10: itemSignature
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
/**
* Appends to the current document the signature
* of the given ``member`` as a list item.
*
* @param element Member to write signature from.
*/
public void itemSignature(final ProgramElementDoc element) {
item();
returnSignature(element);
character(' ');
linkedName(element);
if (element instanceof ExecutableMemberDoc) {
final ExecutableMemberDoc member = (ExecutableMemberDoc) element;
inlineParameters(member.parameters());
}
newLine();
}
示例11: processExecutableMemberDocStub
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
/**
* @return a JSON stub for the given ExecutableMemberDoc
*/
protected JSONObject processExecutableMemberDocStub(ExecutableMemberDoc emDoc) {
JSONObject retMe = processMemberDocStub(emDoc);
retMe.put("parameters", processParameterStubs(emDoc.parameters()));
retMe.put("flatSignature", emDoc.flatSignature());
retMe.put("thrownExceptionTypes", processTypes(emDoc.thrownExceptionTypes()));
retMe.put("typeParameters", processTypeVariables(emDoc.typeParameters()));
return retMe;
}
示例12: getExecutableMemberDocRef
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
@Override
public DocReferenceable getExecutableMemberDocRef(ExecutableMemberDoc executableMemberDoc) {
if (packageList.contains(executableMemberDoc.containingPackage().name())) {
return new ExternalRef(executableMemberDoc);
}
return null;
}
示例13: ExternalRef
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
public ExternalRef(ExecutableMemberDoc executableMemberDoc) {
name = executableMemberDoc.name() + "()";
qualifiedName = executableMemberDoc.containingClass().qualifiedName() + "#" + executableMemberDoc.name()
+ executableMemberDoc.signature();
url = ExternalRefProvider.this.url + executableMemberDoc.containingPackage().name().replace('.',
'/') + "/" + executableMemberDoc.containingClass().name() + ".html#" + executableMemberDoc.name()
+ executableMemberDoc.signature();
}
示例14: getExecutableMemberDocRef
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
@Override
public DocReferenceable getExecutableMemberDocRef(ExecutableMemberDoc executableMemberDoc) {
for (IRefProvider provider : apiRefProviderList) {
DocReferenceable result = provider.getExecutableMemberDocRef(executableMemberDoc);
if (result != null) {
return result;
}
}
return unknownRefProvider.getExecutableMemberDocRef(executableMemberDoc);
}
示例15: ApiPageRef
import com.sun.javadoc.ExecutableMemberDoc; //导入依赖的package包/类
public ApiPageRef(ExecutableMemberDoc executableMemberDoc, ApiPage apiPage) {
this.name = executableMemberDoc.containingClass().name() + '.' + executableMemberDoc.name() +
executableMemberDoc.flatSignature();
this.qualifiedName = executableMemberDoc.containingClass().qualifiedName() + "#" + executableMemberDoc.name() +
executableMemberDoc.signature();
this.apiPage = apiPage;
this.anchor = executableMemberDoc.name() + executableMemberDoc.signature();
}