protected AccessRestriction getAccessRestriction(String packageName) { if (exportedPackages != null && !exportedPackages.contains(packageName)) { AccessRule rule = new AccessRule(null /* pattern */, IProblem.ForbiddenReference, true /* keep looking for accessible type */); return new AccessRestriction(rule, AccessRestriction.COMMAND_LINE, getEntryName()); } return null; }
protected AccessRestriction getAccessRestriction(String packageName) { if (exportedPackages != null && !exportedPackages.contains(packageName)) { AccessRule rule = new AccessRule(null /* pattern */, IProblem.ForbiddenReference, true /* keep looking for accessible type */); return new AccessRestriction(rule, AccessRestriction.COMMAND_LINE, getEntryName()); } return null; }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
public static AccessRestrictionClasspathEntry forbidAll(DependencyClasspathEntry entry) { AccessRule accessRule = new AccessRule(null /* pattern */, IProblem.ForbiddenReference, true /* keep looking for accessible type */); AccessRestriction accessRestriction = new AccessRestriction(accessRule, AccessRestriction.COMMAND_LINE, entry.getEntryName()); return new AccessRestrictionClasspathEntry(entry, accessRestriction); }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
public static AccessRestrictionClasspathEntry forbidAll(DependencyClasspathEntry entry) { AccessRule accessRule = new AccessRule(null /* pattern */, IProblem.ForbiddenReference, true /* keep looking for accessible type */); AccessRestriction accessRestriction = new AccessRestriction(accessRule, AccessRestriction.COMMAND_LINE, entry.getEntryName()); return new AccessRestrictionClasspathEntry(entry, accessRestriction); }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }
/** * Select the first access rule which is violated when accessing a given type, * or null if no 'non accessible' access rule applies. * @param targetTypeFilePath the target type file path, formed as: * "org/eclipse/jdt/core/JavaCore" * @return the first access restriction that applies if any, null else */ public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { for (int i = 0, length = this.accessRules.length; i < length; i++) { AccessRule accessRule = this.accessRules[i]; if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath, true/*case sensitive*/, '/')) { switch (accessRule.getProblemId()) { case IProblem.ForbiddenReference: case IProblem.DiscouragedReference: return new AccessRestriction(accessRule, this.classpathEntryType, this.classpathEntryName); default: return null; } } } return null; }