org.aspectj.org.eclipse.jdt.internal.compiler.env
Class AccessRuleSet

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.compiler.env.AccessRuleSet

public class AccessRuleSet
extends java.lang.Object

Definition of a set of access rules used to flag forbidden references to non API code.


Field Summary
static int MESSAGE_TEMPLATES_LENGTH
           
 java.lang.String[] messageTemplates
           
 
Constructor Summary
AccessRuleSet(AccessRule[] accessRules, java.lang.String[] messageTemplates)
          Make a new set of access rules.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 AccessRule[] getAccessRules()
           
 AccessRestriction getViolatedRestriction(char[] targetTypeFilePath)
          Select the first access rule which is violated when accessing a given type, or null if no 'non accessible' access rule applies.
 java.lang.String toString()
           
 java.lang.String toString(boolean wrap)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

messageTemplates

public java.lang.String[] messageTemplates

MESSAGE_TEMPLATES_LENGTH

public static final int MESSAGE_TEMPLATES_LENGTH
See Also:
Constant Field Values
Constructor Detail

AccessRuleSet

public AccessRuleSet(AccessRule[] accessRules,
                     java.lang.String[] messageTemplates)
Make a new set of access rules.

Parameters:
accessRules - the access rules to be contained by the new set
messageTemplates - a Sting[4] array specifying the messages for type, constructor, method and field access violation; each should contain as many placeholders as expected by the respective access violation message (that is, one for type and constructor, two for method and field); replaced by a default value if null.
Method Detail

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getAccessRules

public AccessRule[] getAccessRules()

getViolatedRestriction

public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath)
Select the first access rule which is violated when accessing a given type, or null if no 'non accessible' access rule applies.

Parameters:
targetTypeFilePath - the target type file path, formed as: "org.aspectj.org.eclipse.jdt/core/JavaCore"
Returns:
the first access restriction that applies if any, null else

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(boolean wrap)