in modules/compiler/src/java/flex2/compiler/asdoc/ClassTable.java [1267:1520]
private void processTags(String id)
{
//Extracting description
int is = id.indexOf("<description><![CDATA[");
int ie = id.indexOf("]]></description>");
description = id.substring(is + "<description><![CDATA[".length(), ie);
//extracting @return
int index = id.indexOf("]]></return>");
int endCDATABefore;
int begin;
if (index >= 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<return><![CDATA[", endCDATABefore) + "<return><![CDATA[".length();
returnTag = id.substring(begin, index);
}
index = id.indexOf("]]></return>", index+12);
if (index > 0)
ThreadLocalToolkit.getLogger().logError("More than one @return found in " + this.fullname + ".");
//extracting @param (multiple)
index = id.indexOf("]]></param>");
if (index >= 0)
paramTags = new ArrayList<String>();
while (index >= 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<param><![CDATA[", endCDATABefore);
paramTags.add(id.substring(begin + "<param><![CDATA[".length(), index));
index = id.indexOf("]]></param>", index + "]]></param>".length());
}
//check for @inheritDoc
index = id.indexOf("]]></inheritDoc>");
hasInheritTag = index > 0 ? true : false;
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<inheritDoc><![CDATA[", endCDATABefore) + "<inheritDoc><![CDATA[".length();
inheritDocTagLocation = id.substring(begin, index).trim();
}
index = id.indexOf("]]></inheritDoc>", index+16);
if (index > 0)
ThreadLocalToolkit.getLogger().logError("More than one @inheritDoc found in " + this.fullname + ".");
//extracting @author tags
index = id.indexOf("]]></author>");
if (index >= 0)
authorTags = new ArrayList<String>();
while (index >= 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<author><![CDATA[", endCDATABefore);
authorTags.add(id.substring(begin + "<author><![CDATA[".length(), index));
index = id.indexOf("]]></author>", index + "]]></author>".length());
}
//extracting @copy
index = id.indexOf("]]></copy>");
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<copy><![CDATA[", endCDATABefore) + "<copy><![CDATA[".length();
copyTag = id.substring(begin, index);
}
//extracting @default
index = id.indexOf("]]></default>");
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<default><![CDATA[", endCDATABefore) + "<default><![CDATA[".length();
defaultTag = id.substring(begin, index);
}
//extracting @event (multiple)
index = id.indexOf("]]></event>");
if (index >= 0)
eventTags = new ArrayList<String>();
while (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<event><![CDATA[", endCDATABefore);
eventTags.add(id.substring(begin + "<event><![CDATA[".length(), index));
index = id.indexOf("]]></event>", index + "]]></event>".length());
}
//extracting @eventType
index = id.indexOf("]]></eventType>");
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<eventType><![CDATA[", endCDATABefore) + "<eventType><![CDATA[".length();
eventTypeTag = id.substring(begin, index);
}
//extracting @example (multiple)
index = id.indexOf("]]></example>");
if (index >= 0)
exampleTags = new ArrayList<String>();
while (index >= 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<example><![CDATA[", endCDATABefore);
exampleTags.add(id.substring(begin + "<example><![CDATA[".length(), index));
index = id.indexOf("]]></example>", index + "]]></example>".length());
}
//extracting @helpid
index = id.indexOf("]]></helpid>");
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<helpid><![CDATA[", endCDATABefore) + "<helpid><![CDATA[".length();
helpidTag = id.substring(begin, index);
}
//extracting @includeExample (multiple)
index = id.indexOf("]]></includeExample>");
if (index >= 0)
includeExampleTags = new ArrayList<String>();
while (index >= 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<includeExample><![CDATA[", endCDATABefore);
includeExampleTags.add(id.substring(begin + "<includeExample><![CDATA[".length(), index));
index = id.indexOf("]]></includeExample>", index + "]]></includeExample>".length());
}
//extracting @internal
index = id.indexOf("]]></internal>");
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<internal><![CDATA[", endCDATABefore) + "<internal><![CDATA[".length();
internalTag = id.substring(begin, index);
}
//extracting @langversion
index = id.indexOf("]]></langversion>");
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<langversion><![CDATA[", endCDATABefore) + "<langversion><![CDATA[".length();
langversionTag = id.substring(begin, index);
}
//extracting @playerversion (multiple)
index = id.indexOf("]]></playerversion>");
if (index >= 0)
playerversionTags = new ArrayList<String>();
while (index >= 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<playerversion><![CDATA[", endCDATABefore);
playerversionTags.add(id.substring(begin + "<playerversion><![CDATA[".length(), index));
index = id.indexOf("]]></playerversion>", index + "]]></playerversion>".length());
}
//check for @private
hasPrivateTag = id.indexOf("]]></private>") > 0 ? true : false;
//extracting @productversion (multiple)
index = id.indexOf("]]></productversion>");
if (index >= 0)
productversionTags = new ArrayList<String>();
while (index >= 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<productversion><![CDATA[", endCDATABefore);
productversionTags.add(id.substring(begin + "<productversion><![CDATA[".length(), index));
index = id.indexOf("]]></productversion>", index + "]]></productversion>".length());
}
//extracting @since
index = id.indexOf("]]></since>");
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<since><![CDATA[", endCDATABefore) + "<since><![CDATA[".length();
sinceTag = id.substring(begin, index);
}
//check for @review
hasReviewTag = id.indexOf("]]></review>") > 0 ? true : false;
//extracting @see (multiple)
index = id.indexOf("]]></see>");
if (index >= 0)
seeTags = new ArrayList<String>();
while (index >= 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<see><![CDATA[", endCDATABefore);
String see = id.substring(begin + "<see><![CDATA[".length(), index);
if (see.indexOf('<') >= 0)
ThreadLocalToolkit.getLogger().logError("Do not use html in @see. Offending text: " + see + " Located at " + this.fullname + ".");
seeTags.add(see);
index = id.indexOf("]]></see>", index + "]]></see>".length());
}
//extracting @throws (multiple)
index = id.indexOf("]]></throws>");
if (index >= 0)
throwsTags = new ArrayList<String>();
while (index >= 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<throws><![CDATA[", endCDATABefore);
throwsTags.add(id.substring(begin + "<throws><![CDATA[".length(), index));
index = id.indexOf("]]></throws>", index + "]]></throws>".length());
}
//extracting @tiptext
index = id.indexOf("]]></tiptext>");
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<tiptext><![CDATA[", endCDATABefore) + "<tiptext><![CDATA[".length();
tiptextTag = id.substring(begin, index);
}
//extracting @toolversion
index = id.indexOf("]]></toolversion>");
if (index > 0)
{
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
begin = id.indexOf("<toolversion><![CDATA[", endCDATABefore) + "<toolversion><![CDATA[".length();
toolversionTag = id.substring(begin, index);
}
//extracting @<unknown>
index = id.indexOf("]]></");
while (index >= 0)
{
int beginTag = index + "]]></".length();
int endTag = id.indexOf(">", beginTag);
String tagName = (id.substring(beginTag, endTag)).intern();
if (!matchesAnyTag(tagName))
{
if(tagName.indexOf("!") != -1)
{
ThreadLocalToolkit.getLogger().logError("Unexpected symbol ! (" + tagName
+ ") found in " + this.fullname + ".");
}
if(tagName.indexOf(":") != -1)
{
ThreadLocalToolkit.getLogger().logError("Unexpected symbol : (" + tagName
+ ") found in " + this.fullname + ".");
}
if (customTags == null)
customTags = new LinkedHashMap<String, String>();
endCDATABefore = id.substring(0, index).lastIndexOf("]]>");
String tag = "<" + tagName + "><![CDATA[";
begin = id.indexOf(tag, endCDATABefore) + tag.length();
customTags.put(tagName, id.substring(begin, index));
}
index = id.indexOf("]]></", endTag + 1);
}
}