|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bm.ejb3metadata.utils.MetadataUtils
public final class MetadataUtils
Util class for ejb3unit.
Field Summary | |
---|---|
static int |
OSTYPE_LINUX
This field is used to OSTYPE_LINUX. |
static int |
OSTYPE_MAC
This field is used to OSTYPE_MAC. |
static int |
OSTYPE_NETWARE
This field is used to OSTYPE_NETWARE. |
static int |
OSTYPE_OS2
This field is used to OSTYPE_OS2. |
static int |
OSTYPE_SOLARIS
This field is used to OSTYPE_SOLARIS. |
static int |
OSTYPE_UNKNOWN
This field is used to OSTYPE_UNKNOWN. |
static int |
OSTYPE_WINCE
This field is used to OSTYPE_WINCE. |
static int |
OSTYPE_WINDOWS
This field is used to OSTYPE_WINDOWS. |
static int |
OSTYPE_WINNT
This field is used to OSTYPE_WINNT. |
Method Summary | |
---|---|
static java.lang.reflect.Field[] |
getAllFields(java.lang.Class forClass)
Returns all fields (including fields from all superclasses) of a class. |
static java.lang.reflect.Method[] |
getAllMethods(java.lang.Class forClass)
Returns all fields (including fields from all superclasses) of a class. |
static java.util.List<java.lang.Class> |
getLocalRemoteInterfaces(java.lang.Class toAnalyse)
Returns all business (local, remote) interfaces of the class. |
static java.lang.Class |
getNonPrimitiveType(java.lang.Class aktField)
This method will do the transformation of primitive types if neccessary. |
static int |
getOs()
Determines the OS. |
static java.lang.String |
getPackageName(java.lang.String longClassName)
Retrun a short class name. |
static java.io.File |
getRootPackageDir(java.io.File location,
java.lang.String longPackageName)
Retrurns the root package directory e.g com.ejb3unit.eg --> returns com. |
static java.lang.String |
getShortClassName(java.lang.Class clazz)
Retrun a short class name. |
static java.lang.String |
getShortClassName(java.lang.String longClassName)
Retrun a short class name. |
static java.io.File |
getTempDirectory()
Returns a path to an temp directory. |
static java.lang.String |
isolateJarName(java.net.URL fileInJar)
Isolates a jar file when a file was found inside a jar. |
static java.util.List<java.lang.String> |
scanFileNamesInArchive(java.io.InputStream in)
Scan for files in jar file. |
static java.util.List<java.io.File> |
unjar(java.io.InputStream in,
java.io.File dest)
Dump the contents of a JarArchive to the dpecified destination. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OSTYPE_WINDOWS
public static final int OSTYPE_WINNT
public static final int OSTYPE_WINCE
public static final int OSTYPE_LINUX
public static final int OSTYPE_MAC
public static final int OSTYPE_SOLARIS
public static final int OSTYPE_NETWARE
public static final int OSTYPE_OS2
public static final int OSTYPE_UNKNOWN
Method Detail |
---|
public static java.lang.String isolateJarName(java.net.URL fileInJar)
fileInJar
- -
the path to the file inside the jar file
public static int getOs()
public static java.util.List<java.io.File> unjar(java.io.InputStream in, java.io.File dest) throws java.io.IOException
in
- -
the jar archive as input streamdest
- -
the destination (to extract the content)
java.io.IOException
- -
in an error casepublic static java.util.List<java.lang.String> scanFileNamesInArchive(java.io.InputStream in) throws java.io.IOException
in
- -
the jar archive as input stream
java.io.IOException
- -
in an error casepublic static java.util.List<java.lang.Class> getLocalRemoteInterfaces(java.lang.Class toAnalyse)
toAnalyse
- -
the session bean /service to analyse
public static java.lang.Class getNonPrimitiveType(java.lang.Class aktField)
aktField
- -
the field to inspect
public static java.lang.reflect.Field[] getAllFields(java.lang.Class forClass)
forClass
- -
for which class
public static java.lang.reflect.Method[] getAllMethods(java.lang.Class forClass)
forClass
- -
for which class
public static java.lang.String getShortClassName(java.lang.String longClassName)
longClassName
- -
the long fully qualified calss name
public static java.lang.String getPackageName(java.lang.String longClassName)
longClassName
- -
the long fully qualified calss name
public static java.io.File getRootPackageDir(java.io.File location, java.lang.String longPackageName)
location
- -
the location of th epackagelongPackageName
- -
the long fully qualified class name
public static java.lang.String getShortClassName(java.lang.Class clazz)
clazz
- -
for class
public static java.io.File getTempDirectory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |