1 package com.puppycrawl.tools.checkstyle.checks; 20 21 import org.apache.commons.beanutils.ConversionException; 22 23 import com.puppycrawl.tools.checkstyle.api.Check; 24 25 29 public abstract class AbstractOptionCheck 30 extends Check 31 { 32 33 private AbstractOption mOption; 34 35 39 public AbstractOptionCheck(AbstractOption aDefault) 40 { 41 mOption = aDefault; 42 } 43 44 49 public void setOption(String aOption) 50 throws ConversionException 51 { 52 mOption = mOption.decode(aOption); 53 if (mOption == null) { 54 throw new ConversionException("unable to parse " + aOption); 55 } 56 } 57 58 61 public AbstractOption getAbstractOption() 62 { 63 return mOption; 66 } 67 } 68 | Popular Tags |