Package javassist

Examples of javassist.ClassClassPath


    JdbcJavassistProxyFactory() {
        classMap = new ClassMap();
        ClassPool defaultPool = ClassPool.getDefault();
        classPool = new ClassPool(defaultPool);
        classPool.insertClassPath(new ClassClassPath(this.getClass()));
        classPool.childFirstLookup = true;

        createProxyConnectionClass();
        createProxyStatementClass();
        createProxyCallableStatementClass();
View Full Code Here


      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      // Insert a classpath so that Maven does not complain about not finding the class
      pool.insertClassPath(new ClassClassPath(Car.class));
      CtClass carCt = pool.get(CAR);
      try {
         carCt.addField(CtField.make("public int year;", carCt));
         Class carClass = carCt.toClass();
         if (isNewExternalizer) {
View Full Code Here

      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      // Insert a classpath so that Maven does not complain about not finding the class
      pool.insertClassPath(new ClassClassPath(Car.class));
      CtClass carCt = pool.get(CAR);
      try {
         carCt.addField(CtField.make("public int year;", carCt));
         Class carClass = carCt.toClass();
         if (isNewExternalizer) {
View Full Code Here

         }
      }

      // Init the Javassist class pool.
      classPool = ClassPool.getDefault();
      classPool.insertClassPath(new ClassClassPath(RhqPluginXmlGenerator.class));
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      dbf.setNamespaceAware(true);
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc = db.newDocument();
      Element root = doc.createElement("plugin");
View Full Code Here

    JdbcJavassistProxyFactory() {
        classMap = new ClassMap();
        ClassPool defaultPool = ClassPool.getDefault();
        classPool = new ClassPool(defaultPool);
        classPool.insertClassPath(new ClassClassPath(this.getClass()));
        classPool.childFirstLookup = true;

        createProxyConnectionClass();
        createProxyStatementClass();
        createProxyCallableStatementClass();
View Full Code Here

        for (Resource resource : resResolver.getResources("classpath*:org/apache/syncope/core/**/*.class")) {
            MetadataReader metadataReader = cachingMetadataReaderFactory.getMetadataReader(resource);
            if (metadataReader.getAnnotationMetadata().isAnnotated(Entity.class.getName())) {

                Class entity = Class.forName(metadataReader.getClassMetadata().getClassName());
                classPool.appendClassPath(new ClassClassPath(entity));
                CtClass ctClass = ClassPool.getDefault().get(entity.getName());
                if (ctClass.isFrozen()) {
                    ctClass.defrost();
                }
                ClassFile classFile = ctClass.getClassFile();
View Full Code Here

    //  Create proxy class
    //
      ClassPool pool = ClassPool.getDefault();
     
      // TOMCAT and JBOSS classloader handling
      pool.insertClassPath(new ClassClassPath(clazz));
     
      CtClass proxyClass = pool.makeClass(proxyClassName);
     
    //  Add proxy inheritance
    //
View Full Code Here

     */
    public MockClassLoader(String[] classesToMock, String[] packagesToDefer) {
        super(MockClassLoader.class.getClassLoader(), getPackagesToDefer(packagesToDefer));

        addClassesToModify(classesToMock);
        classPool.appendClassPath(new ClassClassPath(this.getClass()));
    }
View Full Code Here

      CtClass abstraction = null;
      try {
        abstraction = POOL.get(type.getName());
      }
      catch (NotFoundException e) {
        POOL.insertClassPath(new ClassClassPath(type));
        abstraction = POOL.get(type.getName());
      }
      CtClass implementation = factory.createSubClass(type.getName(), abstraction);

      methodInjector.injectBehavior(type, abstraction, implementation);
View Full Code Here

  }

  public void add(Class<? extends Annotation> annotation,
      Class<? extends InvocationHandler> handler) {
    annotations.put(annotation, handler);
    ClassPool.getDefault().insertClassPath(new ClassClassPath(handler));
  }
View Full Code Here

TOP

Related Classes of javassist.ClassClassPath

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.