Examples of subtypeOf()


Examples of javassist.CtClass.subtypeOf()

public class JPAEnhancer extends Enhancer {

    public void enhanceThisClass(ApplicationClass applicationClass) throws Exception {
        CtClass ctClass = makeClass(applicationClass);

        if (!ctClass.subtypeOf(classPool.get("play.db.jpa.JPABase"))) {
            return;
        }

        // Enhance only JPA entities
        if (!hasAnnotation(ctClass, "javax.persistence.Entity")) {
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

            return;
        }

        CtClass ctClass = makeClass(applicationClass);

        if (!ctClass.subtypeOf(classPool.get(ControllersEnhancer.ControllerSupport.class.getName()))) {
            return;
        }

        final boolean[] needsContinuations = new boolean[]{false};
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

        if (isAnon(applicationClass)) {
            return;
        }

        CtClass ctClass = makeClass(applicationClass);
        if (!ctClass.subtypeOf(classPool.get(LocalVariablesSupport.class.getName())) && !ctClass.getName().matches("^controllers\\..*\\$class$")) {
            return;
        }

        for (CtMethod method : ctClass.getDeclaredMethods()) {

View Full Code Here

Examples of javassist.CtClass.subtypeOf()

    @Override
    public void enhanceThisClass(ApplicationClass applicationClass) throws Exception {
        CtClass ctClass = makeClass(applicationClass);

        if (ctClass.subtypeOf(classPool.get(Model.class.getName()))) {
            String entityName = ctClass.getName();

            Logger.trace("Enhancing ODB entity %s", entityName);

            // All
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

      byte[] result = null;
      CtClass cc = null;
        try {
          cc = pool.makeClass(new ByteArrayInputStream(bytes));
     
      if (cc.subtypeOf(pool.get(ActiveRecord.class.getName())) && furtherCheckAllowedToChange(cc)) {
        addMethods(cc, ClassWorkSource.arMethods);
        result = cc.toBytecode();
      }
      else {
        result = bytes;
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

            try {
                if (cache == null)
                    cache = cp.get(oldName);
   
                CtClass cache2 = cp.get(typeName);
                if (cache2.subtypeOf(cache)) {
                    cache = cache2;
                    return true;
                }
                else
                    return false;
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

    if(ctClass == null) return;
    String pack = ctClass.getPackageName();
        if(pack==null || pack.startsWith("java.")){
          return;
        }       
        if (ctClass.subtypeOf(classPool.get(siena.Json.class.getName()))) {
            return;
        }
        boolean isModel = false;
       
        if(ctClass.subclassOf(classPool.get(siena.Model.class.getName()))){
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

            return;
        }

        CtClass ctClass = makeClass(applicationClass);

        if (!ctClass.subtypeOf(classPool.get(Mailer.class.getName()))) {
            return;
        }

        for (final CtMethod ctMethod : ctClass.getDeclaredMethods()) {
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

            return;
        }

        CtClass ctClass = makeClass(applicationClass);

        if (!ctClass.subtypeOf(classPool.get(ControllersEnhancer.ControllerSupport.class.getName()))) {
            return ;
        }


        boolean needsContinuations = shouldEnhance( ctClass );
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

            return;
        }

        CtClass ctClass = makeClass(applicationClass);

        if (!ctClass.subtypeOf(classPool.get(ControllerSupport.class.getName()))) {
            return;
        }

        for (final CtMethod ctMethod : ctClass.getDeclaredMethods()) {
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.