本文整理汇总了Java中com.sun.javadoc.AnnotationTypeElementDoc类的典型用法代码示例。如果您正苦于以下问题:Java AnnotationTypeElementDoc类的具体用法?Java AnnotationTypeElementDoc怎么用?Java AnnotationTypeElementDoc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AnnotationTypeElementDoc类属于com.sun.javadoc包,在下文中一共展示了AnnotationTypeElementDoc类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: parseIdentifier
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
private String parseIdentifier(Doc doc) {
if (doc instanceof ClassDoc) {
ClassDoc classDoc = (ClassDoc) doc;
return parseIdentifier((Doc) classDoc.containingPackage()) + classDoc.name() + "/";
} else if (doc instanceof AnnotationTypeElementDoc) {
AnnotationTypeElementDoc annotationTypeElementDoc = (AnnotationTypeElementDoc) doc;
return parseIdentifier((Doc) annotationTypeElementDoc.containingClass()) + "#" + annotationTypeElementDoc.name();
} else if (doc instanceof FieldDoc) {
FieldDoc fieldDoc = (FieldDoc) doc;
return parseIdentifier((Doc) fieldDoc.containingClass()) + "#" + fieldDoc.name();
} else if (doc instanceof ConstructorDoc) {
ConstructorDoc constructorDoc = (ConstructorDoc) doc;
return parseIdentifier((Doc) constructorDoc.containingClass()) + "#" + constructorDoc.name() + URLEncoder.encode(constructorDoc.flatSignature());
} else if (doc instanceof MethodDoc) {
MethodDoc methodDoc = (MethodDoc) doc;
return parseIdentifier((Doc) methodDoc.containingClass()) + "#" + methodDoc.name() + URLEncoder.encode(methodDoc.flatSignature());
} else {
return "/" + doc.name() + "/";
}
}
开发者ID:riptano,项目名称:xml-doclet,代码行数:22,代码来源:Parser.java
示例2: getAnnotElems
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
public AnnotationTypeElementDoc[] getAnnotElems()
{
Vector myDocs = new Vector();
ClassDoc mainDoc = (ClassDoc) getVariables().get("curitem");
//System.out.println(mainDoc.typeName());
//System.out.println(mainDoc instanceof AnnotationTypeDoc);
AnnotationTypeDoc doc = (AnnotationTypeDoc) mainDoc;
AnnotationTypeElementDoc[] docs = doc.elements();
for (int i = 0; i != docs.length; i++)
{
if (docs[i].isPrivate())
{
continue;
}
myDocs.add(docs[i]);
}
AnnotationTypeElementDoc[] docArray = (AnnotationTypeElementDoc[]) myDocs.toArray(new AnnotationTypeElementDoc[0]);
Arrays.sort(docArray);
return docArray;
}
开发者ID:tcolar,项目名称:javaontracks,代码行数:22,代码来源:JOTDocletNavView.java
示例3: toPairNode
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
/**
*
* @return an "element" XML node for the element value pair.
*/
private static XMLNode toPairNode(ElementValuePair pair) {
if (pair == null) return null;
XMLNode node = new XMLNode("element");
AnnotationTypeElementDoc element = pair.element();
node.attribute("name", element.name());
node.child(toComment(element));
node.child(toAnnotationValueNode(pair.value()));
return node;
}
开发者ID:pageseeder,项目名称:xmldoclet,代码行数:14,代码来源:XMLDoclet.java
示例4: processAnnotationTypeElementDocs
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
/**
* @return the full JSON for the given annotation type
*/
protected JSONArray processAnnotationTypeElementDocs(AnnotationTypeElementDoc[] annoTypeElementDocs) {
JSONArray retMe = new JSONArray();
for (AnnotationTypeElementDoc annoTypeElementDoc : annoTypeElementDocs) {
retMe.add( processAnnotationTypeElementDoc( annoTypeElementDoc ) );
}
return retMe;
}
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:14,代码来源:JsonDoclet.java
示例5: processAnnotationTypeElementDoc
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
/**
* @return the full JSON for the given annotation type
*/
protected JSONObject processAnnotationTypeElementDoc(AnnotationTypeElementDoc annoTypeElementDoc) {
if (annoTypeElementDoc == null) {
return null;
}
JSONObject retMe = processMethodDoc( annoTypeElementDoc );
// retMe.put("name", annoTypeElementDoc.name());
// retMe.put("qualifiedName", annoTypeElementDoc.qualifiedName());
// retMe.put("returnType", processTypeStub(annoTypeElementDoc.returnType()));
retMe.put("defaultValue", processAnnotationValue( annoTypeElementDoc.defaultValue() ) );
return retMe;
}
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:18,代码来源:JsonDoclet.java
示例6: processAnnotationTypeElementDocStub
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
/**
* @return the full JSON for the given annotation type
*/
protected JSONObject processAnnotationTypeElementDocStub(AnnotationTypeElementDoc annoTypeElementDoc) {
if (annoTypeElementDoc == null) {
return null;
}
JSONObject retMe = processMemberDocStub( annoTypeElementDoc );
retMe.put("returnType", processTypeStub(annoTypeElementDoc.returnType()));
// JSONObject retMe = new JSONObject();
// retMe.put("name", annoTypeElementDoc.name())
return retMe;
}
开发者ID:rob4lderman,项目名称:javadoc-json-doclet,代码行数:17,代码来源:JsonDoclet.java
示例7: toPairNode
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
/**
*
* @return an "element" XML node for the element value pair.
*/
private static XMLNode toPairNode(ElementValuePair pair) {
if (pair == null) return null;
XMLNode node = new XMLNode("element");
AnnotationTypeElementDoc element = pair.element();
node.attribute("name", element.name());
node.child(toShortComment(element));
node.child(toComment(element));
node.child(toAnnotationValueNode(pair.value()));
return node;
}
开发者ID:bazooka,项目名称:bazooka-wo-xmldoclet,代码行数:15,代码来源:XMLDoclet.java
示例8: parseAnnotationTypeDoc
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
/**
* Parse an annotation.
*
* @param annotationTypeDoc
* A AnnotationTypeDoc instance
* @return the annotation node
*/
protected Annotation parseAnnotationTypeDoc(ClassDoc classDoc) {
Annotation annotationNode = objectFactory.createAnnotation();
annotationNode.setName(classDoc.name());
annotationNode.setDisplayName(classDoc.simpleTypeName());
annotationNode.setIdentifier(parseIdentifier((Doc) classDoc));
annotationNode.setFull(classDoc.qualifiedName());
annotationNode.setComment(parseComment(classDoc));
annotationNode.setScope(parseScope(classDoc));
Tag[] tags;
SeeTag[] seeTags;
tags = classDoc.tags("@deprecated");
if (tags.length > 0) {
annotationNode.setDeprecated(parseComment(tags[0]));
}
tags = classDoc.tags("@since");
if (tags.length > 0) {
annotationNode.setSince(tags[0].text());
}
tags = classDoc.tags("@version");
if (tags.length > 0) {
annotationNode.setVersion(tags[0].text());
}
tags = classDoc.tags("@author");
for (int i = 0; i < tags.length; i++) {
annotationNode.getAuthor().add(tags[i].text());
}
seeTags = classDoc.seeTags();
for (int i = 0; i < seeTags.length; i++) {
annotationNode.getLink().add(parseLink(seeTags[i]));
}
for (AnnotationTypeElementDoc annotationTypeElementDoc : ((AnnotationTypeDoc) classDoc).elements()) {
annotationNode.getElement().add(parseAnnotationTypeElementDoc(annotationTypeElementDoc));
}
return annotationNode;
}
开发者ID:riptano,项目名称:xml-doclet,代码行数:52,代码来源:Parser.java
示例9: parseAnnotationTypeElementDoc
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
/**
* Parse the elements of an annotation
*
* @param element
* A AnnotationTypeElementDoc instance
* @return the annotation element node
*/
protected AnnotationElement parseAnnotationTypeElementDoc(AnnotationTypeElementDoc annotationTypeElementDoc) {
AnnotationElement annotationElementNode = objectFactory.createAnnotationElement();
annotationElementNode.setName(annotationTypeElementDoc.name());
annotationElementNode.setIdentifier(parseIdentifier((Doc) annotationTypeElementDoc));
annotationElementNode.setId(annotationTypeElementDoc.name());
annotationElementNode.setFull(annotationTypeElementDoc.qualifiedName());
annotationElementNode.setComment(parseComment(annotationTypeElementDoc));
AnnotationValue value = annotationTypeElementDoc.defaultValue();
if (value != null) {
annotationElementNode.setDefault(value.toString());
}
Tag[] tags;
SeeTag[] seeTags;
tags = annotationTypeElementDoc.tags("@deprecated");
if (tags.length > 0) {
annotationElementNode.setDeprecated(parseComment(tags[0]));
}
tags = annotationTypeElementDoc.tags("@since");
if (tags.length > 0) {
annotationElementNode.setSince(tags[0].text());
}
tags = annotationTypeElementDoc.tags("@version");
if (tags.length > 0) {
annotationElementNode.setVersion(tags[0].text());
}
Return returnNode = objectFactory.createReturn();
tags = annotationTypeElementDoc.tags("@return");
if (tags.length > 0) {
returnNode.setComment(parseComment(tags[0]));
}
returnNode.setType(parseTypeInfo(annotationTypeElementDoc.returnType()));
annotationElementNode.setReturn(returnNode);
seeTags = annotationTypeElementDoc.seeTags();
for (int i = 0; i < seeTags.length; i++) {
annotationElementNode.getLink().add(parseLink(seeTags[i]));
}
return annotationElementNode;
}
开发者ID:riptano,项目名称:xml-doclet,代码行数:57,代码来源:Parser.java
示例10: getElemValue
import com.sun.javadoc.AnnotationTypeElementDoc; //导入依赖的package包/类
public String getElemValue(AnnotationTypeElementDoc doc)
{
Object value = doc.defaultValue();
return value == null ? null : formatValue(value);
}
开发者ID:tcolar,项目名称:javaontracks,代码行数:6,代码来源:JOTDocletNavView.java
注:本文中的com.sun.javadoc.AnnotationTypeElementDoc类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论