@Override public Object getProperty(String property) { if ("context".equals(property)) { return context; } else { Object value = Helper.resolveProperty(new InvocationContextImpl(context), property); if (value != null) { return value; } else { value = InvokerHelper.getProperty(owner, property); } return value; } }
public Appendable append(char c) throws IOException { InvocationContextImpl.this.append(c); return this; } public Appendable append(CharSequence csq, int start, int end) throws IOException {
public Screenable cls() throws IOException { InvocationContextImpl.this.cls(); return this; } public void flush() throws IOException {
public void flush() throws IOException { InvocationContextImpl.this.flush(); } });
public CommandInvoker<?, ?> resolve(String s) throws CommandException { CRaSHSession session = (CRaSHSession)getSession(); Token token2 = Token.parse(s); try { PipeLineFactory factory = token2.createFactory(); return factory.create(session); } catch (CommandNotFoundException e) { throw new CommandException(ErrorKind.SYNTAX, e.getMessage(), e); } }
public int getWidth() { return InvocationContextImpl.this.getWidth(); } public int getHeight() {
public int getHeight() { return InvocationContextImpl.this.getHeight(); } public Screenable append(CharSequence s) throws IOException {
public void close() throws Exception { if (status != CLOSED) { try { flush(); } catch (Exception e) { // Ignore ? } status = CLOSED; commandContext.close(); } }
public CommandInvoker<?, ?> resolve(String s) throws CommandException { CRaSHSession session = (CRaSHSession)getSession(); Token token2 = Token.parse(s); try { PipeLineFactory factory = token2.createFactory(); return factory.create(session); } catch (CommandNotFoundException e) { throw new CommandException(ErrorKind.SYNTAX, e.getMessage(), e); } }
public int getWidth() { return InvocationContextImpl.this.getWidth(); } public int getHeight() {
public int getHeight() { return InvocationContextImpl.this.getHeight(); } public Screenable append(CharSequence s) throws IOException {
@Override public Object getVariable(String name) { if (name.equals("context")) { return proxy; } else { if (session != null) { try { Command<?> cmd = session.getCommand(name); if (cmd != null) { return new PipeLineClosure(new InvocationContextImpl<Object>(proxy), name, cmd); } } catch (CommandException ignore) { // Really ? } return super.getVariable(name); } else { return super.getVariable(name); } } } }
public Appendable append(CharSequence csq, int start, int end) throws IOException { InvocationContextImpl.this.append(csq, start, end); return this; } public Screenable append(Style style) throws IOException {
public void flush() throws IOException { InvocationContextImpl.this.flush(); } });
public Screenable cls() throws IOException { InvocationContextImpl.this.cls(); return this; } public void flush() throws IOException {
public CommandInvoker<?, ?> resolve(String s) throws CommandException { CRaSHSession session = (CRaSHSession)getSession(); Token token2 = Token.parse(s); try { PipeLineFactory factory = token2.createFactory(); return factory.create(session); } catch (CommandNotFoundException e) { throw new CommandException(ErrorKind.SYNTAX, e.getMessage(), e); } }
public int getWidth() { return InvocationContextImpl.this.getWidth(); } public int getHeight() {
public int getHeight() { return InvocationContextImpl.this.getHeight(); } public Screenable append(CharSequence s) throws IOException {
public void open2(final CommandContext<P> consumer) { invocationContext = new InvocationContextImpl<P>(consumer); command.pushContext(invocationContext); command.unmatched = invoker.getMatch().getRest(); }
public Screenable append(CharSequence s) throws IOException { InvocationContextImpl.this.append(s); return this; } public Appendable append(char c) throws IOException {