1 package com.puppycrawl.tools.checkstyle.bcel.classfile; 2 3 import java.util.Set ; 4 5 import org.apache.bcel.classfile.FieldOrMethod; 6 7 import com.puppycrawl.tools.checkstyle.api.Scope; 8 9 13 public class Utils 14 { 15 22 public static boolean inScope(FieldOrMethod aFieldOrMethod, Set aScopes) 23 { 24 if (aFieldOrMethod.isPrivate()) { 25 return (aScopes.contains(Scope.PRIVATE)); 26 } 27 else if (aFieldOrMethod.isProtected()) { 28 return (aScopes.contains(Scope.PROTECTED)); 29 } 30 else if (aFieldOrMethod.isPublic()) { 31 return (aScopes.contains(Scope.PUBLIC)); 32 } 33 else { 34 return (aScopes.contains(Scope.PACKAGE)); 35 } 36 } 37 38 39 } 40 | Popular Tags |