Package com.thoughtworks.paranamer

Examples of com.thoughtworks.paranamer.AnnotationParanamer


  public CodeGeneratorMethod(Method m){
    this.underlyingMethod = m;
    this.methodName = m.getName();
    this.returnType = m.getReturnType();
//    Paranamer para = new BytecodeReadingParanamer();
    Paranamer para = new AnnotationParanamer();
    String[] parameterNames = para.lookupParameterNames(m, true);
    if(parameterNames == null) throw new RuntimeException(String.format("Unable to read the parameter names for method %s.  This is likely due to the class files not including the appropriate debugging information.  Look up java -g for more information.", m));
    Class<?>[] types = m.getParameterTypes();
    if(parameterNames.length != types.length) throw new RuntimeException(String.format("Unexpected number of parameter names %s.  Expected %s on method %s.", Arrays.toString(parameterNames), Arrays.toString(types), m.toGenericString()));
    arguments = new CodeGeneratorArgument[parameterNames.length];
    for(int i =0 ; i < parameterNames.length; i++){
View Full Code Here


  public CodeGeneratorMethod(Method m) {
    this.underlyingMethod = m;
    this.methodName = m.getName();
    this.returnType = m.getReturnType();
//    Paranamer para = new BytecodeReadingParanamer();
    Paranamer para = new AnnotationParanamer();
    String[] parameterNames = para.lookupParameterNames(m, true);
    if (parameterNames == null) {
      throw new RuntimeException(String.format("Unable to read the parameter names for method %s.  This is likely due to the class files not including the appropriate debugging information.  Look up java -g for more information.", m));
    }
    Class<?>[] types = m.getParameterTypes();
    if (parameterNames.length != types.length) {
View Full Code Here

  public CodeGeneratorMethod(Method m){
    this.underlyingMethod = m;
    this.methodName = m.getName();
    this.returnType = m.getReturnType();
//    Paranamer para = new BytecodeReadingParanamer();
    Paranamer para = new AnnotationParanamer();
    String[] parameterNames = para.lookupParameterNames(m, true);
    if(parameterNames == null) throw new RuntimeException(String.format("Unable to read the parameter names for method %s.  This is likely due to the class files not including the appropriate debugging information.  Look up java -g for more information.", m));
    Class<?>[] types = m.getParameterTypes();
    if(parameterNames.length != types.length) throw new RuntimeException(String.format("Unexpected number of parameter names %s.  Expected %s on method %s.", Arrays.toString(parameterNames), Arrays.toString(types), m.toGenericString()));
    arguments = new CodeGeneratorArgument[parameterNames.length];
    for(int i =0 ; i < parameterNames.length; i++){
View Full Code Here

TOP

Related Classes of com.thoughtworks.paranamer.AnnotationParanamer

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.