Package railo.commons.lang

Examples of railo.commons.lang.PhysicalClassLoader.loadClass()


  // LOAD CLASS
      //print.out(className);
    // check last Mod
    if(classFile.lastModified()>=classFileOriginal.lastModified()) {
      try {
        Class clazz=cl.loadClass(className);
        if(clazz!=null && !hasChangesOfChildren(classFile.lastModified(),clazz))return registerTypeMapping(clazz);
      }
      catch(Throwable t){}
    }
    if(!create) return null;
View Full Code Here


          ResourceUtil.touch(classFile);
          IOUtil.copy(new ByteArrayInputStream(barr), classFile,true);
         
          cl = (PhysicalClassLoader) ((PageContextImpl)pc).getRPCClassLoader(true);
         
          return registerTypeMapping(cl.loadClass(className, barr));
        }
        catch(Throwable t) {
          throw Caster.toPageException(t);
        }
    }
View Full Code Here

    Resource rootDir = cl.getDirectory();
    Resource classFile = rootDir.getRealResource(real.concat(".class"));
   
    if(classFile.exists()) {
      try {
        Class clazz = cl.loadClass(className);
        Field field = clazz.getField("_md5_");
        if(ASMUtil.createMD5(properties).equals(field.get(null))){
        //if(equalInterface(properties,clazz)) {
          return ClassUtil.loadInstance(clazz);
        }
View Full Code Here

      IOUtil.copy(new ByteArrayInputStream(barr), classFile,true);
     
      if(pc==null)cl = (PhysicalClassLoader)secondChanceConfig.getRPCClassLoader(exist);
      else cl = (PhysicalClassLoader)((PageContextImpl)pc).getRPCClassLoader(exist);
     
    return ClassUtil.loadInstance(cl.loadClass(className));

  }

 
   
View Full Code Here

    Resource classFileOriginal = mapping.getClassRootDirectory().getRealResource(realOriginal.concat(".class"));

    // load existing class
    if(classFile.lastModified()>=classFileOriginal.lastModified()) {
      try {
        Class clazz=cl.loadClass(className);
        if(clazz!=null && !hasChangesOfChildren(classFile.lastModified(), clazz))return clazz;//ClassUtil.loadInstance(clazz);
      }
      catch(Throwable t){}
    }
View Full Code Here

    byte[] barr = ASMUtil.createPojo(real, ASMUtil.toASMProperties(
        ComponentUtil.getProperties(component, false, true, false, false)),Object.class,new Class[]{Pojo.class},component.getPageSource().getDisplayPath());
      ResourceUtil.touch(classFile);
      IOUtil.copy(new ByteArrayInputStream(barr), classFile,true);
      cl = (PhysicalClassLoader)((PageContextImpl)pc).getRPCClassLoader(true);
    return cl.loadClass(className); //ClassUtil.loadInstance(cl.loadClass(className));
    }

  private static int createMethod(BytecodeContext statConstr,BytecodeContext constr, java.util.List<LitString> keys,ClassWriter cw,String className, Object member,int max,boolean writeLog, boolean supressWSbeforeArg) throws PageException {
   
    boolean hasOptionalArgs=false;
View Full Code Here

        try {
          ResourceUtil.touch(classFile);
          IOUtil.copy(new ByteArrayInputStream(barr), classFile,true);
         
          cl = (PhysicalClassLoader) pci.getRPCClassLoader(true);
          Class<?> clazz = cl.loadClass(className, barr);
          return newInstance(clazz, pc.getConfig(),cfc);
        }
        catch(Throwable t) {
          throw Caster.toPageException(t);
        }
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.