1 package com.puppycrawl.tools.checkstyle.checks.j2ee; 20 21 import com.puppycrawl.tools.checkstyle.api.DetailAST; 22 import com.puppycrawl.tools.checkstyle.api.TokenTypes; 23 24 28 public abstract class BeanMethodChecker 29 extends MethodChecker 30 { 31 35 public BeanMethodChecker(AbstractBeanCheck aCheck) 36 { 37 super(aCheck); 38 } 39 40 43 public void checkMethod(DetailAST aMethodAST) 44 { 45 final DetailAST nameAST = aMethodAST.findFirstToken(TokenTypes.IDENT); 47 final String name = nameAST.getText(); 48 if (name.startsWith("ejbCreate")) { 49 checkCreateMethod(aMethodAST); 50 } 51 } 52 53 58 protected void checkCreateMethod(DetailAST aMethodAST) 59 { 60 checkMethod(aMethodAST, false); 62 } 63 } 64 | Popular Tags |