public int hashCode() { final int prime = 31; int result = 1; result = prime * result + hashCode(this.accessRules); result = prime * result + ((this.classpathEntryName == null) ? 0 : this.classpathEntryName.hashCode()); result = prime * result + this.classpathEntryType; return result; }
@Override public String toString() { return toString(true/*wrap lines*/); }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ClasspathDirectory)) return false; ClasspathDirectory dir = (ClasspathDirectory) o; if (this.accessRuleSet != dir.accessRuleSet) if (this.accessRuleSet == null || !this.accessRuleSet.equals(dir.accessRuleSet)) return false; return this.binaryFolder.equals(dir.binaryFolder); }
private static AccessRuleSet readRestriction(DataInputStream in) throws IOException { int length = in.readInt(); if (length == 0) return null; // no restriction specified AccessRule[] accessRules = new AccessRule[length]; for (int i = 0; i < length; i++) { char[] pattern = readName(in); int problemId = in.readInt(); accessRules[i] = new ClasspathAccessRule(pattern, problemId); } JavaModelManager manager = JavaModelManager.getJavaModelManager(); return new AccessRuleSet(accessRules, in.readByte(), manager.intern(in.readUTF())); }
/** * Return the first access rule which is violated when accessing a given * type, or null if no 'non accessible' access rule applies. * * @param qualifiedBinaryFileName * tested type specification, formed as: * "org/eclipse/jdt/core/JavaCore.class"; on systems that * use \ as File.separator, the * "org\eclipse\jdt\core\JavaCore.class" is accepted as well * @return the first access rule which is violated when accessing a given * type, or null if none applies */ protected AccessRestriction fetchAccessRestriction(String qualifiedBinaryFileName) { if (this.accessRuleSet == null) return null; char [] qualifiedTypeName = qualifiedBinaryFileName. substring(0, qualifiedBinaryFileName.length() - SUFFIX_CLASS.length) .toCharArray(); if (File.separatorChar == '\\') { CharOperation.replace(qualifiedTypeName, File.separatorChar, '/'); } return this.accessRuleSet.getViolatedRestriction(qualifiedTypeName); }
/** * @see IClasspathEntry#getAccessRules() */ public IAccessRule[] getAccessRules() { if (this.accessRuleSet == null) return NO_ACCESS_RULES; AccessRule[] rules = this.accessRuleSet.getAccessRules(); int length = rules.length; if (length == 0) return NO_ACCESS_RULES; IAccessRule[] result = new IAccessRule[length]; System.arraycopy(rules, 0, result, 0, length); return result; }
private static AccessRuleSet readRestriction(DataInputStream in) throws IOException { int length = in.readInt(); if (length == 0) return null; // no restriction specified AccessRule[] accessRules = new AccessRule[length]; for (int i = 0; i < length; i++) { char[] pattern = readName(in); int problemId = in.readInt(); accessRules[i] = new ClasspathAccessRule(pattern, problemId); } JavaModelManager manager = JavaModelManager.getJavaModelManager(); return new AccessRuleSet(accessRules, in.readByte(), manager.intern(in.readUTF())); }
/** * Return the first access rule which is violated when accessing a given * type, or null if no 'non accessible' access rule applies. * * @param qualifiedBinaryFileName * tested type specification, formed as: * "org/eclipse/jdt/core/JavaCore.class"; on systems that * use \ as File.separator, the * "org\eclipse\jdt\core\JavaCore.class" is accepted as well * @return the first access rule which is violated when accessing a given * type, or null if none applies */ protected AccessRestriction fetchAccessRestriction(String qualifiedBinaryFileName) { if (this.accessRuleSet == null) return null; char [] qualifiedTypeName = qualifiedBinaryFileName. substring(0, qualifiedBinaryFileName.length() - SUFFIX_CLASS.length) .toCharArray(); if (File.separatorChar == '\\') { CharOperation.replace(qualifiedTypeName, File.separatorChar, '/'); } return this.accessRuleSet.getViolatedRestriction(qualifiedTypeName); }
/** * @see IClasspathEntry#getAccessRules() */ public IAccessRule[] getAccessRules() { if (this.accessRuleSet == null) return NO_ACCESS_RULES; AccessRule[] rules = this.accessRuleSet.getAccessRules(); int length = rules.length; if (length == 0) return NO_ACCESS_RULES; IAccessRule[] result = new IAccessRule[length]; System.arraycopy(rules, 0, result, 0, length); return result; }
private static AccessRuleSet readRestriction(DataInputStream in) throws IOException { int length = in.readInt(); if (length == 0) return null; // no restriction specified AccessRule[] accessRules = new AccessRule[length]; JavaModelManager manager = JavaModelManager.getJavaModelManager(); for (int i = 0; i < length; i++) { char[] pattern = readName(in); int problemId = in.readInt(); accessRules[i] = manager.getAccessRuleForProblemId(pattern,problemId); } return new AccessRuleSet(accessRules, in.readByte(), manager.intern(in.readUTF())); }
/** * Return the first access rule which is violated when accessing a given * type, or null if no 'non accessible' access rule applies. * * @param qualifiedBinaryFileName * tested type specification, formed as: * "org/eclipse/jdt/core/JavaCore.class"; on systems that * use \ as File.separator, the * "org\eclipse\jdt\core\JavaCore.class" is accepted as well * @return the first access rule which is violated when accessing a given * type, or null if none applies */ protected AccessRestriction fetchAccessRestriction(String qualifiedBinaryFileName) { if (this.accessRuleSet == null) return null; char [] qualifiedTypeName = qualifiedBinaryFileName. substring(0, qualifiedBinaryFileName.length() - SUFFIX_CLASS.length) .toCharArray(); if (File.separatorChar == '\\') { CharOperation.replace(qualifiedTypeName, File.separatorChar, '/'); } return this.accessRuleSet.getViolatedRestriction(qualifiedTypeName); }
public String toString() { return toString(true/*wrap lines*/); }
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + hashCode(this.accessRules); result = prime * result + ((this.classpathEntryName == null) ? 0 : this.classpathEntryName.hashCode()); result = prime * result + this.classpathEntryType; return result; }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ClasspathDirectory)) return false; ClasspathDirectory dir = (ClasspathDirectory) o; if (this.accessRuleSet != dir.accessRuleSet) if (this.accessRuleSet == null || !this.accessRuleSet.equals(dir.accessRuleSet)) return false; return this.binaryFolder.equals(dir.binaryFolder); }
/** * @see IClasspathEntry#getAccessRules() */ public IAccessRule[] getAccessRules() { if (this.accessRuleSet == null) return NO_ACCESS_RULES; AccessRule[] rules = this.accessRuleSet.getAccessRules(); int length = rules.length; if (length == 0) return NO_ACCESS_RULES; IAccessRule[] result = new IAccessRule[length]; System.arraycopy(rules, 0, result, 0, length); return result; }
private static AccessRuleSet readRestriction(DataInputStream in) throws IOException { int length = in.readInt(); if (length == 0) return null; // no restriction specified AccessRule[] accessRules = new AccessRule[length]; for (int i = 0; i < length; i++) { char[] pattern = readName(in); int problemId = in.readInt(); accessRules[i] = new ClasspathAccessRule(pattern, problemId); } JavaModelManager manager = JavaModelManager.getJavaModelManager(); return new AccessRuleSet(accessRules, in.readByte(), manager.intern(in.readUTF())); }
/** * Return the first access rule which is violated when accessing a given * type, or null if no 'non accessible' access rule applies. * * @param qualifiedBinaryFileName * tested type specification, formed as: * "org/eclipse/jdt/core/JavaCore.class"; on systems that * use \ as File.separator, the * "org\eclipse\jdt\core\JavaCore.class" is accepted as well * @return the first access rule which is violated when accessing a given * type, or null if none applies */ protected AccessRestriction fetchAccessRestriction(String qualifiedBinaryFileName) { if (this.accessRuleSet == null) return null; char [] qualifiedTypeName = qualifiedBinaryFileName. substring(0, qualifiedBinaryFileName.length() - SUFFIX_CLASS.length) .toCharArray(); if (File.separatorChar == '\\') { CharOperation.replace(qualifiedTypeName, File.separatorChar, '/'); } return this.accessRuleSet.getViolatedRestriction(qualifiedTypeName); }
public String toString() { return toString(true/*wrap lines*/); }
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + hashCode(this.accessRules); result = prime * result + ((this.classpathEntryName == null) ? 0 : this.classpathEntryName.hashCode()); result = prime * result + this.classpathEntryType; return result; }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ClasspathDirectory)) return false; ClasspathDirectory dir = (ClasspathDirectory) o; if (this.accessRuleSet != dir.accessRuleSet) if (this.accessRuleSet == null || !this.accessRuleSet.equals(dir.accessRuleSet)) return false; return this.binaryFolder.equals(dir.binaryFolder); }