|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.imolinfo.jbi4ejb.webservice.generator.Util
public final class Util
Cut&paset from it.imolinfo.jbi4corba.webservice.generator.Util
methods.
Method Summary | |
---|---|
static void |
compileJavaClasses(java.lang.String workdirsrc,
java.lang.String workdirclasses,
java.util.List<java.lang.String> javaSources,
java.util.List<java.lang.String> jarFiles,
java.util.List<java.lang.String> extraClassPath)
Compile the java sources. |
static boolean |
containsIgnoreSlashes(java.util.List<java.lang.String> list,
java.lang.String myString)
Contains ignore slashes. |
static java.util.Set<java.lang.Class> |
findClassUsed(java.lang.String dir,
java.util.List<java.io.File> classList)
This method extracs all the classes used as method's parameter or method's result from a class list. |
static java.util.List<java.io.File> |
findFilesFromSourceDirectory(java.lang.String basedirString,
java.lang.String extensionFilter)
This method find all the files in a directory according to the filter. |
static java.util.List<java.io.File> |
findFilesFromSourceDirectoryFromExactFileName(java.lang.String basedirString,
java.lang.String exactName)
This method find all the files in a directory according to the filter. |
static java.util.List<java.lang.String> |
findJavaSources(java.lang.String basedir,
java.util.List<java.lang.String> exclude)
Find java sources in a directory. |
static org.objectweb.asm.ClassReader |
getAsmCLassReader(java.lang.String className)
This method returns the class reader used for the bytecode manipulation. |
static java.net.URLClassLoader |
getURLClassLoader(java.lang.String absolutePath)
Gets the URL class loader, setting the parent ClassLoader to this class ClassLoader. |
static java.net.URLClassLoader |
getURLClassLoader(java.lang.String absolutePath,
java.lang.ClassLoader parent)
Gets the URL class loader, setting the parent ClassLoader. |
static java.util.List<java.lang.String> |
prepareClassPath(java.lang.String libDirName)
The list of names of the jars used in the classpath. |
static void |
saveAsJavaClass(java.lang.String absoluteFileName,
byte[] newBytecode)
Save the bytecode as java class. |
static java.lang.String |
tweakInterfaceClasses(java.lang.String portTypeClassName,
java.lang.String classesDirName)
Tweak interface classes addint the java.rmi.Remote interface. |
static void |
tweakSerializableDecoration(java.lang.String absPath,
java.lang.Long newSerialVersionUid)
This method modify the bytecode of a class: add Serializable interface and set the serial version UID. |
static org.objectweb.asm.ClassVisitor |
tweakSerializableInspection(java.lang.String absPath)
This method inspect a class to verify if it is Serilizable and to extract the serial version UID (if exists). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void compileJavaClasses(java.lang.String workdirsrc, java.lang.String workdirclasses, java.util.List<java.lang.String> javaSources, java.util.List<java.lang.String> jarFiles, java.util.List<java.lang.String> extraClassPath) throws ClassGenerationException
from it.imolinfo.jbi4corba.webservice.generator.Util
.
workdirsrc
- Where the sources areworkdirclasses
- Where the sources are compiledjavaSources
- The java sourcesjarFiles
- The jar files to add in the classpathextraClassPath
- The extra classpath
ClassGenerationException
- If some problem occurspublic static java.util.List<java.lang.String> findJavaSources(java.lang.String basedir, java.util.List<java.lang.String> exclude) throws EJBDeployException
basedir
- The base directoryexclude
- The files to exclude
EJBDeployException
- If some problem occurspublic static boolean containsIgnoreSlashes(java.util.List<java.lang.String> list, java.lang.String myString)
list
- The list to testmyString
- The string to search
public static java.util.List<java.io.File> findFilesFromSourceDirectory(java.lang.String basedirString, java.lang.String extensionFilter)
basedirString
- The directory where the method works.extensionFilter
- The filter (the suffix of the files).
public static java.util.List<java.io.File> findFilesFromSourceDirectoryFromExactFileName(java.lang.String basedirString, java.lang.String exactName)
findFilesFromSourceDirectory
method, except
that looks fpr the EXACT file name and adds the base directory in the
search.
basedirString
- The directory where the method works.exactName
- The exact file name
public static java.lang.String tweakInterfaceClasses(java.lang.String portTypeClassName, java.lang.String classesDirName) throws ClassGenerationException
java.rmi.Remote
interface.
portTypeClassName
- The interface class nameclassesDirName
- The classes directory
ClassGenerationException
- If some problem occurspublic static void saveAsJavaClass(java.lang.String absoluteFileName, byte[] newBytecode) throws ClassGenerationException
absoluteFileName
- The file namenewBytecode
- The bytecode to save
ClassGenerationException
- If some problem occurspublic static java.net.URLClassLoader getURLClassLoader(java.lang.String absolutePath, java.lang.ClassLoader parent) throws java.net.MalformedURLException
absolutePath
- The url classloader pathparent
- The parent classloader
java.net.MalformedURLException
- If the URL is not well formedpublic static java.net.URLClassLoader getURLClassLoader(java.lang.String absolutePath) throws java.net.MalformedURLException
absolutePath
- The urel classloader path
java.net.MalformedURLException
- If the URL is not well formedpublic static void tweakSerializableDecoration(java.lang.String absPath, java.lang.Long newSerialVersionUid) throws ClassGenerationException
absPath
- The absolute path of the class to modify.newSerialVersionUid
- The new serialVersionUID.
ClassGenerationException
- If some problem occurspublic static org.objectweb.asm.ClassVisitor tweakSerializableInspection(java.lang.String absPath) throws ClassGenerationException
absPath
- The absolute path of the class to inspect.
ClassGenerationException
- If some problem occurspublic static org.objectweb.asm.ClassReader getAsmCLassReader(java.lang.String className) throws ClassGenerationException
className
- The absolute path of the class (eg: /var/Foo.class).
ClassGenerationException
- If some problem occurspublic static java.util.Set<java.lang.Class> findClassUsed(java.lang.String dir, java.util.List<java.io.File> classList) throws ClassGenerationException
dir
- The directory where to search the classesclassList
- The classes file list
Set
ClassGenerationException
- If some problem occurspublic static java.util.List<java.lang.String> prepareClassPath(java.lang.String libDirName) throws ClassGenerationException
libDirName
- The directory where the jars are located.
ClassGenerationException
- If some problem occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |