private CtClass createCtClass ( final SgClass modelClass ) throws NotFoundException , CannotCompileException { // Create class final CtClass clasz = pool . makeClass ( modelClass . getName ( ) ) ; clasz . setModifiers ( SgUtils . toModifiers ( modelClass . getModifiers ( ) ) ) ; // Add superclass if ( modelClass . getSuperClass ( ) != null ) { clasz . setSuperclass ( pool . get ( modelClass . getSuperClass ( ) . getName ( ) ) ) ; } addInterfaces ( modelClass , clasz ) ; addFields ( modelClass , clasz ) ; addConstructors ( modelClass , clasz ) ; addMethods ( modelClass , clasz ) ; return clasz ; }
Creates a Javassist class from a given model class .