|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodesimian.JavaTextTransform
public class JavaTextTransform
Constructor Summary | |
---|---|
JavaTextTransform()
|
Method Summary | |
---|---|
static java.lang.String |
removeEverythingExceptComments(java.lang.String textOfJavaFile)
this uses a simple algorithm that usually works, but not always |
static java.lang.String |
writeCommentAtTop(java.lang.String javaComment,
java.lang.String textOfJavaFile,
boolean overwrite)
writes javaComment at the top of a .java file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaTextTransform()
Method Detail |
---|
public static java.lang.String writeCommentAtTop(java.lang.String javaComment, java.lang.String textOfJavaFile, boolean overwrite)
javaComment
- must start with / * and end with * / (without the space between * and /).overwrite
- Optionally overwrite first comment found before first java code.
WARNING: does not notice that * / may be after a // and therefore does not apply.
WARNING: does not notice if comments are in a string literal.public static java.lang.String removeEverythingExceptComments(java.lang.String textOfJavaFile)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |