Package railo.runtime.reflection.pairs

Examples of railo.runtime.reflection.pairs.MethodInstance


        if(value!=null)Reflector.callSetterEL(tag, e.getKey().getString(),value);
        //}catch(PageException pe){}
     
    }
    else if(TagLibTag.ATTRIBUTE_TYPE_MIXED==attrType) {
      MethodInstance setter;
      it = attrs.entryIterator();
      while(it.hasNext()) {
        e = it.next();
        setter = Reflector.getSetter(tag, e.getKey().getString(),e.getValue(),null);
        if(setter!=null) {
          try {
            setter.invoke(tag);
          }
          catch (Exception _e) {
            throw Caster.toPageException(_e);
          }
        }
View Full Code Here


                catch (Exception e) {
                    throw Caster.toPageException(e);
                }
        }
        // Getter
            MethodInstance mi = Reflector.getGetterEL(clazz,propertyName);
            if(mi!=null) {
                if(Modifier.isStatic(mi.getMethod().getModifiers())) {
                    try {
                        return mi.invoke(null);
                    }
                    catch (IllegalAccessException e) {
                        throw Caster.toPageException(e);
                    }
                    catch (InvocationTargetException e) {
View Full Code Here

      try {
                return fields[0].get(null);
            } catch (Exception e) {}
    }
        // Getter
        MethodInstance mi = Reflector.getGetterEL(clazz,propertyName);
        if(mi!=null) {
            if(Modifier.isStatic(mi.getMethod().getModifiers())) {
                try {
                    return mi.invoke(null);
                }
                catch (Exception e) {}   
            }
        }
        try {
View Full Code Here

            } catch (Exception e) {
                Caster.toPageException(e);
            }
    }
        // Getter
        MethodInstance mi = Reflector.getSetter(clazz,propertyName.getString(),value,null);
        if(mi!=null) {
            if(Modifier.isStatic(mi.getMethod().getModifiers())) {
                try {
                    return mi.invoke(null);
                }
                catch (IllegalAccessException e) {
                    throw Caster.toPageException(e);
                }
                catch (InvocationTargetException e) {
View Full Code Here

                fields[0].set(null,value);
            } catch (Exception e) {}
      return value;
    }
        // Getter
        MethodInstance mi = Reflector.getSetter(clazz,propertyName.getString(),value,null);
        if(mi!=null) {
            if(Modifier.isStatic(mi.getMethod().getModifiers())) {
                try {
                    return mi.invoke(null);
                }
                catch (Exception e) {}   
            }
        }
          
View Full Code Here

    }
       
       
      try {
        // get method
        MethodInstance mi = Reflector.getMethodInstance(this,clazz,methodName,arguments);
      // call static method if exist
        if(Modifier.isStatic(mi.getMethod().getModifiers())) {
        return mi.invoke(null);
      }
       
        if(arguments.length==0 && methodName.equalsIgnoreCase("getClass")){
          return clazz;
        }
       
        // invoke constructor and call instance method
      return mi.invoke(init());
    }
    catch(InvocationTargetException e) {
      Throwable target = e.getTargetException();
      if(target instanceof PageException) throw (PageException)target;
      throw Caster.toPageException(e.getTargetException());
View Full Code Here

      ((SpecialItem)curr).set(value);
      return value;
    }
    else if(curr instanceof Pair){
      Pair pair=(Pair) curr;
      MethodInstance setter = Reflector.getSetter(pair.throwable, pair.name.getString(), value,null);
      if(setter!=null){
        try {
          setter.invoke(pair.throwable);
          return value;
        } catch (Exception e) {
          throw Caster.toPageException(e);
        }
      }
View Full Code Here

      ((SpecialItem)curr).set(value);
      return value;
    }
    else if(curr instanceof Pair){
      Pair pair=(Pair) curr;
      MethodInstance setter = Reflector.getSetter(pair.throwable, pair.name.getString(), value,null);
      if(setter!=null){
        try {
          setter.invoke(pair.throwable);
        } catch (Exception e) {}
        return value;
      }
    }
    return super.setEL(key, value);
View Full Code Here

    if(curr instanceof SpecialItem){
      return ((SpecialItem)curr).remove();
    }
    else if(curr instanceof Pair){
      Pair pair=(Pair) curr;
      MethodInstance setter = Reflector.getSetter(pair.throwable, pair.name.getString(), null,null);
      if(setter!=null){
        try {
          Object before = pair.getter.invoke(pair.throwable, new Object[0]);
          setter.invoke(pair.throwable);
          return before;
        } catch (Exception e) {
          throw Caster.toPageException(e);
        }
      }
View Full Code Here

TOP

Related Classes of railo.runtime.reflection.pairs.MethodInstance

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.