Package ca.svarb.jyacl

Examples of ca.svarb.jyacl.Attribute


  public OptionInvocationHandler(Map<String, Object> getterMap) {
    this.getterMap=getterMap;
  }

  public Object invoke(Object proxy, Method method, Object[] args) {
    String attributeName = new Attribute(method.getName()).getName();
    if ( !getterMap.containsKey(attributeName) ) {
      throw new IllegalStateException("No value provided in getterMap for \""+attributeName+"\" attribute.");
    }
    Object value = getterMap.get(attributeName);
    return value;
View Full Code Here


      }
      String[] helpText=null;
      if ( method.isAnnotationPresent(Help.class)) {
        helpText = method.getAnnotation(Help.class).value();
      }
      Attribute attribute = new Attribute(method.getName());
      if ( isUnique ) {
        options.add(new CliOption(attribute.getName(), methodReturnType, helpText));
      } else {
        options.add(new CliOption(attribute.getName(), methodReturnType, isMandatory, helpText));
      }
    }
    return options;
  }
View Full Code Here

TOP

Related Classes of ca.svarb.jyacl.Attribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.