Class ClassFile
java.lang.Object
org.springframework.core.test.tools.ClassFile
In memory representation of a Java class.
- Since:
- 6.0
- Author:
- Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Return the bytecode content.getName()Return the fully qualified name of the class.static ClassFileFactory method to create a newClassFilefrom the givencontent.static ClassFileof(String name, InputStreamSource inputStreamSource) Factory method to create a newClassFilefrom the givenInputStreamSource.static StringtoClassName(String path) Return the name of a class based on its relative path.
-
Method Details
-
getName
-
getContent
public byte[] getContent()Return the bytecode content.- Returns:
- the class content
-
of
-
of
Factory method to create a newClassFilefrom the givenInputStreamSource.- Parameters:
name- the fully qualified name of the classinputStreamSource- the bytecode of the class- Returns:
- a
ClassFileinstance
-
toClassName
-