/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Holds the environment for a run of javadoc.
* Holds only the information needed throughout the
* run and not the compiler info that could be GC'ed
* or ported.
*
* @since 1.4
* @author Robert Field
* @author Neal Gafter (rewrite)
* @author Scott Seligman (generics)
*/
public class DocEnv {
return instance;
}
/** Predefined symbols known to the compiler. */
/** Referenced directly in RootDocImpl. */
/** Javadoc's own version of the compiler's enter phase. */
/** The name table. */
/** The encoding name. */
/** Access filter (public, protected, ...). */
/** True if we are using a sentence BreakIterator. */
boolean breakiterator;
/**
* True if we do not want to print any notifications at all.
*/
boolean quiet = false;
/** Allow documenting from class files? */
boolean docClasses = false;
/** Does the doclet only expect pre-1.5 doclet API? */
protected boolean legacyDoclet = true;
/**
* Set this to true if you would like to not emit any errors, warnings and
* notices.
*/
private boolean silent = false;
/**
* Constructor
*
* @param context Context for this javadoc instance.
*/
// Default. Should normally be reset with setLocale.
}
}
/**
* Look up ClassDoc by qualified name.
*/
if (c != null) {
return getClassDoc(c);
} else {
return null;
}
}
/**
* Load ClassDoc by qualified name.
*/
try {
return getClassDoc(c);
} catch (CompletionFailure ex) {
return null;
}
}
/**
* Look up PackageDoc by qualified name.
*/
//### Jing alleges that class check is needed
//### to avoid a compiler bug. Most likely
//### instead a dummy created for error recovery.
//### Should investigate this.
return getPackageDoc(p);
} else {
return null;
}
}
// where
/** Retrieve class symbol by fully-qualified name.
*/
// Name may contain nested class qualification.
// Generate candidate flatnames with successively shorter
// package qualifiers and longer nested class qualifiers.
for (;;) {
if (s != null)
return s; // found it!
if (idx < 0) break;
}
return null;
}
/**
* Set the locale.
*/
// create locale specifics
// reset Messager if locale has changed.
}
/** Check whether this member should be documented. */
return false;
}
}
/** Check whether this member should be documented. */
return false;
}
}
/** check whether this class should be documented. */
return
}
//### Comment below is inaccurate wrt modifier filter testing
/**
* Check the visibility if this is an nested class.
* if this is not a nested class, return true.
* if this is an static visible nested class,
* return true.
* if this is an visible nested class
* if the outer class is visible return true.
* else return false.
* IMPORTANT: This also allows, static nested classes
* to be defined inside an nested class, which is not
* allowed by the compiler. So such an test case will
* not reach upto this method itself, but if compiler
* allows it, then that will go through.
*/
return false;
}
}
//---------------- print forwarders ----------------//
/**
* Print error message, increment error count.
*
* @param msg message to print.
*/
if (silent)
return;
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
*/
if (silent)
return;
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
*/
if (silent)
return;
}
/**
* Print error message, increment error count.
*
* @param msg message to print.
*/
if (silent)
return;
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
* @param a1 first argument
*/
if (silent)
return;
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
*/
if (silent)
return;
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
*/
if (silent)
return;
}
/**
* Print warning message, increment warning count.
*
* @param msg message to print.
*/
if (silent)
return;
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
*/
if (silent)
return;
}
/**
* Print warning message, increment warning count.
*
* @param msg message to print.
*/
if (silent)
return;
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument
*/
if (silent)
return;
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
*/
if (silent)
return;
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
*/
if (silent)
return;
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
*/
if (silent)
return;
}
/**
* Print a message.
*
* @param msg message to print.
*/
return;
}
/**
* Print a message.
*
* @param key selects message from resource
*/
return;
}
/**
* Print a message.
*
* @param msg message to print.
*/
return;
}
/**
* Print a message.
*
* @param key selects message from resource
* @param a1 first argument
*/
return;
}
/**
* Print a message.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
*/
return;
}
/**
* Print a message.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
*/
return;
}
/**
* Exit, reporting errors and warnings.
*/
public void exit() {
// Messager should be replaced by a more general
// compilation environment. This can probably
// subsume DocEnv as well.
}
/**
* Return the PackageDoc of this package symbol.
*/
return result;
}
/**
* Create the PackageDoc (or a subtype) for a package symbol.
*/
} else {
}
}
/**
* Return the ClassDoc (or a subtype) of this class symbol.
*/
if (isAnnotationType(clazz)) {
} else {
}
return result;
}
/**
* Create the ClassDoc (or a subtype) for a class symbol.
*/
protected void makeClassDoc(ClassSymbol clazz, String docComment, JCClassDecl tree, Position.LineMap lineMap) {
return;
}
} else {
}
}
}
}
/**
* Return the FieldDoc of this var symbol.
*/
return result;
}
/**
* Create a FieldDoc for a var symbol.
*/
protected void makeFieldDoc(VarSymbol var, String docComment, JCVariableDecl tree, Position.LineMap lineMap) {
} else {
}
}
/**
* Create a MethodDoc for this MethodSymbol.
* Should be called only on symbols representing methods.
*/
} else {
}
}
/**
* Return the MethodDoc for a MethodSymbol.
* Should be called only on symbols representing methods.
*/
return result;
}
/**
* Create the ConstructorDoc for a MethodSymbol.
* Should be called only on symbols representing constructors.
*/
} else {
}
}
/**
* Return the ConstructorDoc for a MethodSymbol.
* Should be called only on symbols representing constructors.
*/
return result;
}
/**
* Create the AnnotationTypeElementDoc for a MethodSymbol.
* Should be called only on symbols representing annotation type elements.
*/
} else {
result =
}
}
/**
* Return the AnnotationTypeElementDoc for a MethodSymbol.
* Should be called only on symbols representing annotation type elements.
*/
MethodSymbol meth) {
return result;
}
// private Map<ClassType, ParameterizedTypeImpl> parameterizedTypeMap =
// new HashMap<ClassType, ParameterizedTypeImpl>();
/**
* Return the ParameterizedType of this instantiation.
// * ### Could use Type.sameTypeAs() instead of equality matching in hashmap
// * ### to avoid some duplication.
*/
return new ParameterizedTypeImpl(this, t);
// ParameterizedTypeImpl result = parameterizedTypeMap.get(t);
// if (result != null) return result;
// result = new ParameterizedTypeImpl(this, t);
// parameterizedTypeMap.put(t, result);
// return result;
}
/**
* Set the encoding.
*/
}
/**
* Get the encoding.
*/
return encoding;
}
/**
* Convert modifier bits from private coding used by
* the compiler to that of java.lang.reflect.Modifier.
*/
int result = 0;
return result;
}
}