Class JavaClassWriter
java.lang.Object
games.stendhal.tools.rpclassdumper.JavaClassWriter
writes a class definition to a new java file
- Author:
- hendrik
-
Constructor Summary
ConstructorDescriptionJavaClassWriter(String outputFolder, String className)
creates a new JavaClassWriter -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
closes the written file.void
writeAttribute(String visibility, boolean staticFlag, String type, String name)
writes an attributevoid
writeClassDefinition(String parent)
writes the class definitionvoid
writes the closing of the class definition
-
Constructor Details
-
JavaClassWriter
creates a new JavaClassWriter- Parameters:
outputFolder
- the folder to write the java file toclassName
- the name of the class- Throws:
FileNotFoundException
- in case the folder does not exist, or the class name contains dangerous characters.
-
-
Method Details
-
close
public void close()closes the written file. -
writeClassDefinition
writes the class definition- Parameters:
parent
- optional parent class
-
writeEndOfClass
public void writeEndOfClass()writes the closing of the class definition -
writeAttribute
writes an attribute- Parameters:
visibility
- visibility of the attributestaticFlag
- static?type
- datatypename
- name
-