Examples of subtypeOf()


Examples of javassist.CtClass.subtypeOf()

    );

    @Override
    public CtClass enhanceThisClass(DataInputStream dataInputStream) throws Exception {
        CtClass ctClass = classPool.makeClassIfNew(dataInputStream);
        if (!ctClass.subtypeOf(classPool.get("net.csdn.modules.http.ApplicationController"))) {
            return ctClass;
        }

        if (Modifier.isAbstract(ctClass.getModifiers())) return ctClass;
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

 
  private void enhanceThisClass_(ApplicationClass applicationClass) throws Exception {
        final CtClass ctClass = makeClass(applicationClass);
       
        // enhances only EnhancedModel classes
        if (!ctClass.subtypeOf(classPool.get(EnhancedModel.class.getName()))) {
            return;
        }
       
        String entityName = ctClass.getName();
       
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 (t.uppers != null) {
                    int s = t.uppers.size();
                    for (int k = 0; k < s; k++) {
                        CtClass cc = cp.get((String)t.uppers.get(k));
                        if (cc.subtypeOf(type))
                            type = cc;
                    }
                }

                type = fixByUppers(t.usedBy, cp, visited, type);
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

            name = name.replace('/', '.');
            name = name.substring(0, name.length() - 6);
            try
            {
               CtClass clazz = pool.get(name);
               if( clazz.subtypeOf(langThrowable) == true )
               {
                  throwables.put(name, clazz);
               }
            }
            catch(NotFoundException e)
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

        Logger.debug("CrudSiena: start to enhance class:" + applicationClass.name);
        // this method will be called after configuration finished

        final CtClass ctClass = makeClass(applicationClass);
       
        if (!ctClass.subtypeOf(classPool.get("models.crudsiena.SienaSupport"))) {
            return;
        }
       
        for (CtField cf: ctClass.getDeclaredFields()) {
            if (hasAnnotation(cf, siena.Max.class.getName())) {
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

                if (t.uppers != null) {
                    int s = t.uppers.size();
                    for (int k = 0; k < s; k++) {
                        CtClass cc = cp.get((String)t.uppers.get(k));
                        if (cc.subtypeOf(type))
                            type = cc;
                    }
                }

                type = fixByUppers(t.usedBy, cp, visited, type);
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()

        CtClass one = loader.get("byte[]");
        CtClass two = loader.get("byte[][]");
        assertEquals("java.lang.Object", TypeData.commonSuperClassEx(one, two).getName());
        assertTrue(one.subtypeOf(obj));
        assertTrue(two.subtypeOf(obj));
        assertFalse(one.subtypeOf(objarray));
        assertTrue(two.subtypeOf(objarray));

        one = loader.get("int[][]");
        two = loader.get("java.lang.Object[]");
View Full Code Here

Examples of javassist.CtClass.subtypeOf()

        CtClass two = loader.get("byte[][]");
        assertEquals("java.lang.Object", TypeData.commonSuperClassEx(one, two).getName());
        assertTrue(one.subtypeOf(obj));
        assertTrue(two.subtypeOf(obj));
        assertFalse(one.subtypeOf(objarray));
        assertTrue(two.subtypeOf(objarray));

        one = loader.get("int[][]");
        two = loader.get("java.lang.Object[]");
        assertEquals("java.lang.Object[]", TypeData.commonSuperClassEx(one, two).getName());
        assertTrue(one.subtypeOf(objarray));
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.