Exemplo n.º 1
0
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
      String name = method.getName();

      if (m_accessor.isEligible(m_instance, method, args)) {
        return m_accessor.getValue(m_instance, method, args);
      } else {
        throw new UnsupportedOperationException(
            String.format("No method(%s) defined in %s", name, m_instance.getClass()));
      }
    }
Exemplo n.º 2
0
 @Override
 public boolean isEligible(Object instance, Method method, Object[] args) {
   return m_accessor.isEligible(m_value, method, args);
 }
Exemplo n.º 3
0
 @Override
 public Object getValue(Object instance, Method method, Object[] args) throws Throwable {
   return m_accessor.getValue(m_value, method, args);
 }