1 package example; 2 3 import com.caucho.util.L10N; 4 import java.util.logging.Logger ; 5 import java.util.logging.Level ; 6 7 import java.io.IOException ; 8 9 12 abstract public class AbstractCommand { 13 static protected final Logger log = 14 Logger.getLogger(AbstractCommand.class.getName()); 15 static final L10N L = new L10N(AbstractCommand.class); 16 17 private String _error = null; 18 19 public void init() 20 { 21 _error = null; 22 } 23 24 28 abstract void parse(Parser p) throws IOException ; 29 30 37 abstract String act(Magic8Ball magic8ball); 38 39 40 public boolean isError() 41 { 42 return _error != null; 43 } 44 45 public String getError() 46 { 47 return _error; 48 } 49 50 protected void setError(String error) 51 { 52 _error = error; 53 } 54 } 55 56 | Popular Tags |