blob: cc7dd20e814b7a9303869cd7b9f1212c8a76caac [file]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<title>Access Rules</title>
</head>
<body>
<h1>Access Rules</h1>
Access rules can be added to build classpath entries to specify which types in the given entry
can be accessed and which not. If the compiler detects a type access to a type that should not be
accessed, it will create a problem marker.
<ul>
<li>Non-accessible rules define types that must not be referenced. The compiler typically creates an error marker for accesses to these types.</li>
<li>Discouraged rules define types that should not be referenced. The compiler typically creates a warning marker for accesses to these types.</li>
<li>Accessible rules define types that can be referenced.</li>
</ul>
Each rule consist of a pattern (same format as ANT patterns) and one of the rule types listed above.<br>
Each classpath entry can have any number of rules defined. The compiler will process the list in the order
defined and take the first matching rule. <br><br>
The severity of the problem marker generated for accesses to 'Non-accessible' and 'Discouraged' type can be configured
on the Java compiler's <a href="../reference/preferences/java/compiler/ref-preferences-errors-warnings.htm">Error/Warnings</a> preference page.
<p><img border="0" src="../images/ngrelc.png" alt="Related concepts" ></p>
<p>
<a href="concept-java-builder.htm">Java builder</a><br>
<a href="concept-classpath-variables.htm">Classpath variable</a><br>
<a href="concept-inclusion-exclusion-patterns.htm">Inclusion and exclusion patterns</a><br>
<a href="concept-access-rules.htm">Access rules</a> </p>
<p><img src="../images/ngrelr.png" alt="Related reference" border="0" >
</p>
<p>
<a href="../reference/ref-properties-build-path.htm">Java build path properties</a><br>
<a href="../reference/preferences/java/compiler/ref-preferences-errors-warnings.htm">Error/Warnings preference page</a>
</p>
</body>
</html>