Package com.thoughtworks.paranamer

Examples of com.thoughtworks.paranamer.BytecodeReadingParanamer.lookupParameterNames()


    StringBuilder sb=new StringBuilder();
    Paranamer namer = new BytecodeReadingParanamer();
    if (member instanceof Method) {
      Method m = (Method) member;
      parameters = m.getParameterTypes();
      paramnames = namer.lookupParameterNames(m, false);
    } else {
      Constructor c = (Constructor) member;
      parameters = c.getParameterTypes();
      paramnames = namer.lookupParameterNames(c, false);
    }
View Full Code Here


      parameters = m.getParameterTypes();
      paramnames = namer.lookupParameterNames(m, false);
    } else {
      Constructor c = (Constructor) member;
      parameters = c.getParameterTypes();
      paramnames = namer.lookupParameterNames(c, false);
    }
    if (parameters.length > 0) {
      if (paramnames==null || paramnames.length ==0 ) {
        paramnames = createDefaultParamNames(parameters.length);
      }
View Full Code Here

        String[] parameterNames;
        //Attempt to use Paranamer to look up the parameter names for those not using Java 8+.
        //This will fail if trying to evaluate a class using Lambdas, in which case fall back and look up using
        //standard java reflections.  This will provide the paramter name if using the -parameters javac argument.
        try {
            parameterNames = paranamer.lookupParameterNames(method);
        } catch(Exception e) {
            Parameter[] parameters = method.getParameters();
            parameterNames = new String[parameters.length];
            for (int i = 0; i < parameters.length; i++) {
                Parameter parameter = parameters[i];
View Full Code Here

        //
        // Build Parameter Infos
        // Extract parameter names from debug symbols
        Paranamer paranamer = new BytecodeReadingParanamer();
        String[] parameterNames = paranamer.lookupParameterNames(concreteMethod);
        Class<?>[] types = concreteMethod.getParameterTypes();

        // Parameter annotations used form descriptor come from the annotated method, not the public method
        Annotation[][] parameterAnnotations;
        if (annotatedMethod != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.