Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html lang="en" xmlns="" xml:lang="en">
    <meta name="copyright" content=
    "Copyright (c) IBM Corporation and others 2000, 2011. 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=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css" />
      Access Rules

      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.
      <li>Non-accessible rules define types that must not be referenced. The compiler typically
      creates an error marker for accesses to these types.
      <li>Discouraged rules define types that should not be referenced. The compiler typically
      creates a warning marker for accesses to these types.
      <li>Accessible rules define types that can be referenced.

    </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=
    preference page.
      <img border="0" src="../images/ngrelc.png" alt="Related concepts" />

      <a href="concept-access-rules-combine-rules.htm">Combine Access Rules</a><br />
      <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>

      <img src="../images/ngrelr.png" alt="Related reference" border="0" />
      <a href="../reference/ref-properties-build-path.htm">Java build path properties</a><br />
      <a href=
      preference page</a>

New to GrepCode? Check out our FAQ X