|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.devkit.model.code.ResourceFile
org.mule.devkit.model.code.fmt.StaticJavaFile
public final class StaticJavaFile
Statically generated Java soruce file.
ThisResourceFile implementation will generate a Java source
file by copying the source code from a resource.
While copying a resource, we look for a package declaration and
replace it with the target package name. This allows the static Java
source code to have an arbitrary package declaration.
You can also use the getJClass method to obtain a TypeReference
object that represents the static file. This allows the client code
to refer to the class from other CodeModel generated code.
Note that because we don't parse the static Java source code,
the returned TypeReference object doesn't respond to methods like
"isInterface" or "_extends",
| Nested Class Summary | |
|---|---|
static class |
StaticJavaFile.ChainFilter
A StaticJavaFile.LineFilter that combines two StaticJavaFile.LineFilters. |
static interface |
StaticJavaFile.LineFilter
Filter that alters the Java source code. |
| Constructor Summary | |
|---|---|
StaticJavaFile(GeneratedPackage _pkg,
String className,
String _resourceName)
|
|
StaticJavaFile(GeneratedPackage _pkg,
String _className,
URL _source,
StaticJavaFile.LineFilter _filter)
|
|
| Method Summary | |
|---|---|
protected void |
build(OutputStream os)
called by Package to produce the file image. |
TypeReference |
getJClass()
Returns a class object that represents a statically generated code. |
protected boolean |
isResource()
Returns true if this file should be generated into the directory that the resource files go into. |
| Methods inherited from class org.mule.devkit.model.code.ResourceFile |
|---|
name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StaticJavaFile(GeneratedPackage _pkg,
String className,
String _resourceName)
public StaticJavaFile(GeneratedPackage _pkg,
String _className,
URL _source,
StaticJavaFile.LineFilter _filter)
| Method Detail |
|---|
public final TypeReference getJClass()
protected boolean isResource()
ResourceFile
isResource in class ResourceFile
protected void build(OutputStream os)
throws IOException
ResourceFile
build in class ResourceFileIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||