本文整理匯總了Java中com.sun.tools.doclets.Taglet.inConstructor方法的典型用法代碼示例。如果您正苦於以下問題:Java Taglet.inConstructor方法的具體用法?Java Taglet.inConstructor怎麽用?Java Taglet.inConstructor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.sun.tools.doclets.Taglet
的用法示例。
在下文中一共展示了Taglet.inConstructor方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: printTaglets
import com.sun.tools.doclets.Taglet; //導入方法依賴的package包/類
protected void printTaglets(Tag[] tags, TagletContext context, TagletPrinter output, boolean inline)
{
for (Iterator it = tagletMap.keySet().iterator(); it.hasNext(); ) {
String tagName = (String)it.next();
Object o = tagletMap.get(tagName);
Taglet taglet = (Taglet)o;
Doc doc = context.getDoc();
if (inline == taglet.isInlineTag()
&& ((doc == null
&& taglet.inOverview())
|| (doc != null
&& ((doc.isConstructor() && taglet.inConstructor())
|| (doc.isField() && taglet.inField())
|| (doc.isMethod() && taglet.inMethod())
|| (doc instanceof PackageDoc && taglet.inPackage())
|| ((doc.isClass() || doc.isInterface()) && taglet.inType()))))) {
List tagsOfThisType = new LinkedList();
for (int i=0; i<tags.length; ++i) {
if (tags[i].name().substring(1).equals(tagName)) {
tagsOfThisType.add(tags[i]);
}
}
Tag[] tagletTags = (Tag[])tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);
String tagletString;
if (taglet instanceof StandardTaglet) {
tagletString = renderTag(tagName, tagletTags, context);
}
else if (taglet instanceof GnuExtendedTaglet) {
tagletString = ((GnuExtendedTaglet)taglet).toString(tagletTags, context);
}
else {
tagletString = taglet.toString(tagletTags);
}
if (null != tagletString) {
output.printTagletString(tagletString);
}
}
}
}
示例2: outputTaglets
import com.sun.tools.doclets.Taglet; //導入方法依賴的package包/類
void outputTaglets(int level, Tag[] tags, boolean descend, int context)
{
for (Iterator it = tagletMap.keySet().iterator(); it.hasNext(); ) {
String tagName = (String)it.next();
Object o = tagletMap.get(tagName);
Taglet taglet = (Taglet)o;
if (!taglet.isInlineTag()
&& ((context != CONTEXT_CONSTRUCTOR || taglet.inConstructor())
|| (context != CONTEXT_FIELD || taglet.inField())
|| (context != CONTEXT_METHOD || taglet.inMethod())
|| (context != CONTEXT_OVERVIEW || taglet.inOverview())
|| (context != CONTEXT_PACKAGE || taglet.inPackage())
|| (context != CONTEXT_TYPE || taglet.inType()))) {
List tagsOfThisType = new ArrayList();
for (int i=0, ilim=tags.length; i<ilim; ++i) {
if (tags[i].name().substring(1).equals(tagName)) {
tagsOfThisType.add(tags[i]);
}
}
if (!tagsOfThisType.isEmpty()) {
Tag[] tagletTags = (Tag[])tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);
if (taglet instanceof StandardTaglet) {
Iterator tagIterator = tagsOfThisType.iterator();
while (tagIterator.hasNext()) {
Tag tag = (Tag)tagIterator.next();
outputTag(tag, level, descend, context, !tagIterator.hasNext());
}
}
else {
String tagletString = taglet.toString(tagletTags);
if (null != tagletString) {
printOpenTag(0, "tag name=\"" + tagName + "\" taglet-generated=\"true\"");
if (fixHTML) {
print(htmlRepairer.getWellformedHTML(tagletString));
print(htmlRepairer.terminateText());
}
else {
print("<![CDATA["+cdata(tagletString)+"]]>");
}
printCloseTag(0, "tag", false);
}
}
}
}
}
}
示例3: printTaglets
import com.sun.tools.doclets.Taglet; //導入方法依賴的package包/類
protected void printTaglets(Tag[] tags, TagletContext context, TagletPrinter output, boolean inline)
{
for (Iterator it = tagletMap.keySet().iterator(); it.hasNext(); ) {
String tagName = (String)it.next();
Object o = tagletMap.get(tagName);
Taglet taglet = (Taglet)o;
Doc doc = context.getDoc();
if (inline == taglet.isInlineTag()
&& ((doc == null
&& taglet.inOverview())
|| (doc != null
&& ((doc.isConstructor() && taglet.inConstructor())
|| (doc.isField() && taglet.inField())
|| (doc.isMethod() && taglet.inMethod())
|| (doc instanceof PackageDoc && taglet.inPackage())
|| ((doc.isClass() || doc.isInterface()) && taglet.inType()))))) {
List tagsOfThisType = new LinkedList();
for (int i=0; i<tags.length; ++i) {
if (tags[i].name().substring(1).equals(tagName)) {
tagsOfThisType.add(tags[i]);
}
}
Tag[] tagletTags = (Tag[])tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);
String tagletString;
if (taglet instanceof StandardTaglet) {
tagletString = renderTag(tagName, tagletTags, context);
}
else if (taglet instanceof GnuExtendedTaglet) {
tagletString = ((GnuExtendedTaglet)taglet).toString(tagletTags, context);
}
else {
tagletString = taglet.toString(tagletTags);
}
if (null != tagletString) {
output.printTagletString(tagletString);
}
}
}
}
示例4: outputTaglets
import com.sun.tools.doclets.Taglet; //導入方法依賴的package包/類
void outputTaglets(int level, Tag[] tags, boolean descend, int context)
{
for (Iterator it = tagletMap.keySet().iterator(); it.hasNext(); ) {
String tagName = (String)it.next();
Object o = tagletMap.get(tagName);
Taglet taglet = (Taglet)o;
if (!taglet.isInlineTag()
&& ((context != CONTEXT_CONSTRUCTOR || taglet.inConstructor())
|| (context != CONTEXT_FIELD || taglet.inField())
|| (context != CONTEXT_METHOD || taglet.inMethod())
|| (context != CONTEXT_OVERVIEW || taglet.inOverview())
|| (context != CONTEXT_PACKAGE || taglet.inPackage())
|| (context != CONTEXT_TYPE || taglet.inType()))) {
List tagsOfThisType = new ArrayList();
for (int i=0, ilim=tags.length; i<ilim; ++i) {
if (tags[i].name().substring(1).equals(tagName)) {
tagsOfThisType.add(tags[i]);
}
}
if (!tagsOfThisType.isEmpty()) {
Tag[] tagletTags = (Tag[])tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);
if (taglet instanceof StandardTaglet) {
Iterator tagIterator = tagsOfThisType.iterator();
while (tagIterator.hasNext()) {
Tag tag = (Tag)tagIterator.next();
outputTag(tag, level, descend, context, !tagIterator.hasNext());
}
}
else {
String tagletString = taglet.toString(tagletTags);
if (null != tagletString) {
printOpenTag(0, "tag name=\"" + tagName + "\" taglet-generated=\"true\"");
if (fixHTML) {
print(htmlRepairer.getWellformedHTML(tagletString));
print(htmlRepairer.terminateText());
}
else {
print("<![CDATA["+cdata(tagletString)+"]]>");
}
printCloseTag(0, "tag", false);
}
}
}
}
}
}
示例5: printTaglets
import com.sun.tools.doclets.Taglet; //導入方法依賴的package包/類
protected void printTaglets(Tag[] tags, TagletContext context, TagletPrinter output, boolean inline)
{
for (Iterator<String> it = tagletMap.keySet().iterator(); it.hasNext(); ) {
String tagName = it.next();
Taglet taglet = tagletMap.get(tagName);
Doc doc = context.getDoc();
if (inline == taglet.isInlineTag()
&& ((doc == null
&& taglet.inOverview())
|| (doc != null
&& ((doc.isConstructor() && taglet.inConstructor())
|| (doc.isField() && taglet.inField())
|| (doc.isMethod() && taglet.inMethod())
|| (doc instanceof PackageDoc && taglet.inPackage())
|| ((doc.isClass() || doc.isInterface()) && taglet.inType()))))) {
List<Tag> tagsOfThisType = new LinkedList<Tag>();
for (int i=0; i<tags.length; ++i) {
if (tags[i].name().substring(1).equals(tagName)) {
tagsOfThisType.add(tags[i]);
}
}
Tag[] tagletTags = tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);
String tagletString;
if (taglet instanceof StandardTaglet) {
tagletString = renderTag(tagName, tagletTags, context);
}
else if (taglet instanceof GnuExtendedTaglet) {
tagletString = ((GnuExtendedTaglet)taglet).toString(tagletTags, context);
}
else {
tagletString = taglet.toString(tagletTags);
}
if (null != tagletString) {
output.printTagletString(tagletString);
}
}
}
}