Class JavaClassWriter
java.lang.Object
games.stendhal.tools.rpclassdumper.JavaClassWriter
writes a class definition to a new java file
- Author:
- hendrik
-
Constructor Summary
ConstructorsConstructorDescriptionJavaClassWriter(String outputFolder, String className) creates a new JavaClassWriter -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()closes the written file.voidwriteAttribute(String visibility, boolean staticFlag, String type, String name) writes an attributevoidwriteClassDefinition(String parent) writes the class definitionvoidwrites 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
-