Java Doc for Ejb3Utils.java in  » Testing » Ejb3Unit » com » bm » utils » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » Ejb3Unit » com.bm.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.bm.utils.Ejb3Utils

Ejb3Utils
final public class Ejb3Utils (Code)
Util class for ejb3unit.
author:
   Daniel Wiese


Field Summary
final public static  intOSTYPE_LINUX
     This field is used to OSTYPE_LINUX.
final public static  intOSTYPE_MAC
     This field is used to OSTYPE_MAC.
final public static  intOSTYPE_NETWARE
     This field is used to OSTYPE_NETWARE.
final public static  intOSTYPE_OS2
     This field is used to OSTYPE_OS2.
final public static  intOSTYPE_SOLARIS
     This field is used to OSTYPE_SOLARIS.
final public static  intOSTYPE_SUN
     This field is used to OSTYPE_SUN.
final public static  intOSTYPE_UNKNOWN
     This field is used to OSTYPE_UNKNOWN.
final public static  intOSTYPE_WINCE
     This field is used to OSTYPE_WINCE.
final public static  intOSTYPE_WINDOWS
     This field is used to OSTYPE_WINDOWS.
final public static  intOSTYPE_WINNT
     This field is used to OSTYPE_WINNT.


Method Summary
public static  Field[]getAllFields(Class forClass)
     Returns all fields (including fields from all superclasses) of a class.
public static  Method[]getAllMethods(Class forClass)
     Returns all fields (including fields from all superclasses) of a class.
public static  StringgetDecodedFilename(URL url)
    
public static  GeneratorTypegetGeneratorTypeAnnotation(Generator actGenerator)
     Returns a generator type for a given generator.
public static  List<Class>getLocalRemoteInterfaces(Class toAnalyse)
     Returns all business (local, remote) interfaces of the class.
public static  TgetNewInstance(Class<T> forClass)
     Creates a new instance of a bean, even if it's protected constructor. (chapter 2.1 page 17), "The entity class must have a no-arg constructor. The entity class may have other constructors as well.
public static  ClassgetNonPrimitiveType(Property aktField)
     This method will do the transformation of primitive types if necessary.
public static  ClassgetNonPrimitiveType(Class aktField)
     This method will do the transformation of primitive types if necessary.
public static  intgetOs()
     Determines the OS.
public static  StringgetPackageName(String longClassName)
     Return a short class name.
public static  MethodgetParameterlessMethodByName(String name, Class inClass)
     Returns a parameterless method.
public static  CollectiongetRightCollectionType(Property forProperty)
     Returns the right collection type for the given property.
public static  FilegetRootPackageDir(File location, String longPackageName)
     Returns the root package directory e.g com.ejb3unit.eg --> returns com.
public static  StringgetShortClassName(String longClassName)
     Return a short class name.
public static  StringgetShortClassName(Class clazz)
     Return a short class name.
public static  FilegetTempDirectory()
     Returns a path to an temp directory.
public static  booleanhasSuperclassOrInterface(Class toCheck, Class superclassOrInterface)
     Checks if the current class inherits form the specified class.
public static  StringisolateJarName(URL fileInJar)
     Isolates a jar file when a file was found inside a jar.
public static  List<String>scanFileNamesInArchive(InputStream in)
     Scan for files in jar file.
public static  List<File>unjar(InputStream in, File dest)
     Dump the contents of a JarArchive to the specified destination.
public static  InputStreamunjar(InputStream in)
     Extract the first entry in the jar file to an output stream.

Field Detail
OSTYPE_LINUX
final public static int OSTYPE_LINUX(Code)
This field is used to OSTYPE_LINUX.



OSTYPE_MAC
final public static int OSTYPE_MAC(Code)
This field is used to OSTYPE_MAC.



OSTYPE_NETWARE
final public static int OSTYPE_NETWARE(Code)
This field is used to OSTYPE_NETWARE.



OSTYPE_OS2
final public static int OSTYPE_OS2(Code)
This field is used to OSTYPE_OS2.



OSTYPE_SOLARIS
final public static int OSTYPE_SOLARIS(Code)
This field is used to OSTYPE_SOLARIS.



OSTYPE_SUN
final public static int OSTYPE_SUN(Code)
This field is used to OSTYPE_SUN.



OSTYPE_UNKNOWN
final public static int OSTYPE_UNKNOWN(Code)
This field is used to OSTYPE_UNKNOWN.



OSTYPE_WINCE
final public static int OSTYPE_WINCE(Code)
This field is used to OSTYPE_WINCE.



OSTYPE_WINDOWS
final public static int OSTYPE_WINDOWS(Code)
This field is used to OSTYPE_WINDOWS.



OSTYPE_WINNT
final public static int OSTYPE_WINNT(Code)
This field is used to OSTYPE_WINNT.





Method Detail
getAllFields
public static Field[] getAllFields(Class forClass)(Code)
Returns all fields (including fields from all superclasses) of a class.
Parameters:
  forClass - -for which class - all fields



getAllMethods
public static Method[] getAllMethods(Class forClass)(Code)
Returns all fields (including fields from all superclasses) of a class.
Parameters:
  forClass - -for which class - all fields



getDecodedFilename
public static String getDecodedFilename(URL url)(Code)
Decodes an encoded file name in url
Parameters:
  url - the file name the decoded version



getGeneratorTypeAnnotation
public static GeneratorType getGeneratorTypeAnnotation(Generator actGenerator)(Code)
Returns a generator type for a given generator.
author:
   Daniel Wiese
since:
   17.04.2006
Parameters:
  actGenerator - -given generator returns a given generator type



getLocalRemoteInterfaces
public static List<Class> getLocalRemoteInterfaces(Class toAnalyse)(Code)
Returns all business (local, remote) interfaces of the class.
author:
   Daniel Wiese
since:
   05.02.2006
Parameters:
  toAnalyse - -the session bean /service to analyse - the interfaces



getNewInstance
public static T getNewInstance(Class<T> forClass)(Code)
Creates a new instance of a bean, even if it's protected constructor. (chapter 2.1 page 17), "The entity class must have a no-arg constructor. The entity class may have other constructors as well. The no-arg constructor must be public or protected."
author:
   Daniel Wiese
since:
   28.03.2007<
Parameters:
  T - >
Parameters:
  forClass - for which class the instrance



getNonPrimitiveType
public static Class getNonPrimitiveType(Property aktField)(Code)
This method will do the transformation of primitive types if necessary.
Parameters:
  aktField - -the field to inspect the declaring type (or primitive representant)



getNonPrimitiveType
public static Class getNonPrimitiveType(Class aktField)(Code)
This method will do the transformation of primitive types if necessary. It also transform all collection types (List, etc to Collection)
Parameters:
  aktField - -the field to inspect the declaring type (or primitive representant)



getOs
public static int getOs()(Code)
Determines the OS. an integer identifying the OS (one of the OSTYPE constants)



getPackageName
public static String getPackageName(String longClassName)(Code)
Return a short class name. E.g. java.util.StringTokenizer will be StringTokenizer
Parameters:
  longClassName - -the long fully qualified class name - short class name



getParameterlessMethodByName
public static Method getParameterlessMethodByName(String name, Class inClass)(Code)
Returns a parameterless method.
Parameters:
  name - the name of the method
Parameters:
  inClass - in which class the method if found or IllegalArgument exception



getRightCollectionType
public static Collection getRightCollectionType(Property forProperty)(Code)
Returns the right collection type for the given property.
Parameters:
  forProperty - -for which property - the right collection type



getRootPackageDir
public static File getRootPackageDir(File location, String longPackageName)(Code)
Returns the root package directory e.g com.ejb3unit.eg --> returns com.
Parameters:
  location - -the location of the package
Parameters:
  longPackageName - -the long fully qualified class name - root file name



getShortClassName
public static String getShortClassName(String longClassName)(Code)
Return a short class name. E.g. java.util.StringTokenizer will be StringTokenizer
Parameters:
  longClassName - -the long fully qualified calss name - short class name



getShortClassName
public static String getShortClassName(Class clazz)(Code)
Return a short class name. E.g. java.util.StringTokenizer will be StringTokenizer
Parameters:
  clazz - -for class - short class name



getTempDirectory
public static File getTempDirectory()(Code)
Returns a path to an temp directory.
author:
   Daniel Wiese
since:
   29.06.2006 - a path to a temp directory.



hasSuperclassOrInterface
public static boolean hasSuperclassOrInterface(Class toCheck, Class superclassOrInterface)(Code)
Checks if the current class inherits form the specified class.
Parameters:
  toCheck - the class to check
Parameters:
  superclassOrInterface - the superclass true if a supeclass or interface



isolateJarName
public static String isolateJarName(URL fileInJar)(Code)
Isolates a jar file when a file was found inside a jar.
Parameters:
  fileInJar - -the path to the file inside the jar file - the name of the jar file



scanFileNamesInArchive
public static List<String> scanFileNamesInArchive(InputStream in) throws IOException(Code)
Scan for files in jar file.
Parameters:
  in - -the jar archive as input stream - a list with all extracted files
throws:
  IOException - -in an error case



unjar
public static List<File> unjar(InputStream in, File dest) throws IOException(Code)
Dump the contents of a JarArchive to the specified destination.
Parameters:
  in - -the jar archive as input stream
Parameters:
  dest - -the destination (to extract the content) - a list with all extracted files
throws:
  IOException - -in an error case



unjar
public static InputStream unjar(InputStream in) throws IOException(Code)
Extract the first entry in the jar file to an output stream.
Parameters:
  in - -the jar archive as input stream
throws:
  IOException - -in an error case



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.