| java.lang.Object |
| ↳ |
com.atlassian.plugin.test.PluginJarBuilder |
Class Overview
Builds a plugin jar, including optionally compiling simple Java code
Summary
| Public Methods |
|
PluginJarBuilder
|
addFile(String path, File file)
Adds a file to the jar@return
|
|
PluginJarBuilder
|
addFormattedJava(String className, String... lines)
|
|
PluginJarBuilder
|
addFormattedResource(String path, String... lines)
Adds a resource in the jar as lines.
|
|
PluginJarBuilder
|
addJava(String className, String code)
Adds a Java class in source form.
|
|
PluginJarBuilder
|
addPluginInformation(String key, String name, String version, int pluginsVersion, Map<String, String> params)
|
|
PluginJarBuilder
|
addPluginInformation(String key, String name, String version)
|
|
PluginJarBuilder
|
addPluginInformation(String key, String name, String version, int pluginsVersion)
|
|
PluginJarBuilder
|
addResource(String path, String contents)
Adds a resource in the jar from a string
|
|
File
|
build()
Builds a jar file from the provided information.
|
|
File
|
build(File baseDir)
Builds a jar file from the provided information.
|
|
File
|
buildWithNoManifest()
|
|
byte[]
|
getClassFile(String className)
|
|
ClassLoader
|
getClassLoader()
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
PluginJarBuilder
()
public
PluginJarBuilder
(String name)
public
PluginJarBuilder
(String name, ClassLoader classLoader)
Public Methods
public
PluginJarBuilder
addFile
(String path, File file)
Adds a file to the jar@return
Parameters
| path
| The path for the entry |
| file
| The file to add |
public
PluginJarBuilder
addFormattedResource
(String path, String... lines)
Adds a resource in the jar as lines. Single quotes are converted to double quotes.
Parameters
| path
| The path for the jar entry |
| lines
| The contents of the file to create |
public
PluginJarBuilder
addJava
(String className, String code)
Adds a Java class in source form. Will compile the source code.
Parameters
| className
| The class name |
| code
| The code to compile |
public
PluginJarBuilder
addPluginInformation
(String key, String name, String version, int pluginsVersion, Map<String, String> params)
public
PluginJarBuilder
addPluginInformation
(String key, String name, String version)
public
PluginJarBuilder
addPluginInformation
(String key, String name, String version, int pluginsVersion)
public
PluginJarBuilder
addResource
(String path, String contents)
Adds a resource in the jar from a string
Parameters
| path
| The path for the jar entry |
| contents
| The contents of the file to create |
public
File
build
()
Builds a jar file from the provided information. The file name is not guarenteed to match the jar name, as it is
created as a temporary file.
public
File
build
(File baseDir)
Builds a jar file from the provided information. The file name is not guarenteed to match the jar name, as it is
created as a temporary file.
Parameters
| baseDir
| The base directory for generated plugin files |
public
File
buildWithNoManifest
()
public
byte[]
getClassFile
(String className)
Throws
| IllegalAccessException
| |
| NoSuchFieldException
| |
public
ClassLoader
getClassLoader
()