Package net.sourceforge.javautil.bytecode.api.type.method.IBytecodeMethod

Examples of net.sourceforge.javautil.bytecode.api.type.method.IBytecodeMethod.ArgumentMatch


  public IBytecodeMethod findMethod(BytecodeResolutionPool pool, String name, TypeDescriptor... parameters) {
    IBytecodeMethod bm = null;
   
    for (IBytecodeMethod method : this.methods) {
      if (!method.getName().equals(name)) continue;
      ArgumentMatch am = method.compareArguments(pool, parameters);
      if (am == ArgumentMatch.FUNCTIONAL && bm == null) bm = method;
      else if (am == ArgumentMatch.EXACT) { bm = method; break; }
    }
   
    if (bm == null) {
View Full Code Here


  @Override public IBytecodeConstructor findConstructor(BytecodeResolutionPool pool, TypeDescriptor... parameters) {
    IBytecodeConstructor c = null;
   
    for (IBytecodeConstructor cc : this.constructors) {
      ArgumentMatch am = cc.compareArguments(pool, parameters);
      if (am == ArgumentMatch.FUNCTIONAL && c == null) c = cc;
      else if (am == ArgumentMatch.EXACT) { c = cc; break; }
    }
   
    return c;
View Full Code Here

    public IBytecodeConstructor findConstructor(BytecodeResolutionPool pool, TypeDescriptor... types) {
      ConstructorWrapper cw = null;
     
      for (Constructor constructor : clazz.getConstructors()) {
        ConstructorWrapper wrapper = new ConstructorWrapper(constructor);
        ArgumentMatch am = wrapper.compareArguments(pool, types);
        if (am == ArgumentMatch.FUNCTIONAL && cw == null) cw = wrapper;
        else if (am == ArgumentMatch.EXACT) { cw = wrapper; break; }
      }
     
      return cw;
View Full Code Here

      }
      catch (ClassNotFoundException e) {}
      catch (NoSuchMethodException e) {}

      Class sc = clazz;
      ArgumentMatch am = null;
      while (sc != null) {
        Method[] methods = sc.isInterface() ? sc.getMethods() : sc.getDeclaredMethods();
        for (Method method : methods) {
          if (!method.getName().equals(name)) continue;
          MethodWrapper wrapper = new MethodWrapper(method);
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.bytecode.api.type.method.IBytecodeMethod.ArgumentMatch

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.