@Override public Completer getCompleter(boolean scoped) { return new ArgumentCompleter(this, scoped); }
/** * Returns true if the specified character is a whitespace * parameter. Check to ensure that the character is not * escaped and returns true from * {@link #isDelimiterChar}. * * @param buffer the complete command buffer. * @param pos the index of the character in the buffer. * @return true if the character should be a delimiter, false else. */ public boolean isDelimiter(final String buffer, final int pos) { return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos); }
public static void main(String... ar){ Manager manager = new ManagerImpl(); manager.saveCustomer(); // or manager.doBillingOfCustomer(); // etc }
@Override public Object execute(Session session, List<Object> arguments) throws Exception { Action action = createNewAction(session); try { if (new DefaultActionPreparator().prepare(action, session, arguments)) { return action.execute(); } } finally { releaseAction(action); } return null; }
public <T> T instantiate(Class<? extends T> clazz) throws Exception { return instantiate(clazz, dependencies); }
protected Completer getCompleter(Class<?> clazz) { return new DelayedCompleter(clazz); }
protected void releaseAction(Action action) throws Exception { manager.release(action); }
public void addCandidate(String value, String desc) { addCandidate(value, desc, null); }
private String loadDescription(Class<?> clazz, String desc) { if (desc != null && desc.startsWith("classpath:")) { desc = loadClassPathResource(clazz, desc.substring("classpath:".length())); } return desc; }
public boolean isEscaped(final String buffer, final int pos) { return pos > 0 && buffer.charAt(pos) == '\\' && !isEscaped(buffer, pos - 1); }
@Override public Object execute(Session session, List<Object> arguments) throws Exception { Action action = createNewAction(session); try { if (new DefaultActionPreparator().prepare(action, session, arguments)) { return action.execute(); } } finally { releaseAction(action); } return null; }
protected SessionFactory createSessionFactory(ThreadIO threadio) { SessionFactoryImpl sessionFactory = new SessionFactoryImpl(threadio); sessionFactory.register(new ManagerImpl(sessionFactory, sessionFactory)); return sessionFactory; }
/** * Returns true if the specified character is a whitespace * parameter. Check to ensure that the character is not * escaped and returns true from * {@link #isDelimiterChar}. * * @param buffer the complete command buffer. * @param pos the index of the character in the buffer. * @return true if the character should be a delimiter, false else. */ public boolean isDelimiter(final String buffer, final int pos) { return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos); }
@Override public Completer getCompleter(boolean scoped) { return new ArgumentCompleter(this, scoped); }
public <T> T instantiate(Class<? extends T> clazz) throws Exception { return instantiate(clazz, dependencies); }
protected Completer getCompleter(Class<?> clazz) { return new DelayedCompleter(clazz); }
protected void releaseAction(Action action) throws Exception { manager.release(action); }
public void addCandidate(String value, String desc) { addCandidate(value, desc, null); }
private String loadDescription(Class<?> clazz, String desc) { if (desc != null && desc.startsWith("classpath:")) { desc = loadClassPathResource(clazz, desc.substring("classpath:".length())); } return desc; }
protected SessionFactory createSessionFactory(ThreadIO threadio) { SessionFactoryImpl sessionFactory = new SessionFactoryImpl(threadio); sessionFactory.register(new ManagerImpl(sessionFactory, sessionFactory)); return sessionFactory; }