All Packages Class Hierarchy This Package Previous Next Index
Class openjava.util.PartialParser
java.lang.Object
|
+----openjava.util.PartialParser
- public class PartialParser
- extends Object
The PartialParser
class is
an utilty class to make ptree objects from string.
- See Also:
- Ptree, Expression, Statement, StatementList, MemberDeclaration, MemberDeclarationList, TypeDeclaration, CompilationUnit
-
PartialParser()
- Constructor should not be called.
-
makeCompilationUnit(String)
- Makes a CompilationUnit object from the string.
-
makeExpression(String)
- Makes a ptree node from the string like :
"i + 3"
or :
"f()"
-
makeMemberDeclaration(String)
- Makes ptree node from the string like :
"int f(){ return 1; }"
or :
"public String str;"
-
makeMemberDeclarationList(String)
- Makes a ptree node from the string like :
"int f(){ return 1; }" +
"public String str;"
-
makeStatement(String)
- Makes a ptree node from the string like :
"i++;"
or :
"for(;;){ f(); }"
-
makeStatementList(String)
- Makes ptree node from the string like :
"i++; j = 3;"
-
makeTypeDeclaration(String)
- Makes a TypeDeclaration object from the string like :
"public class Test{" +
" public String str;" +
" private int f(){ return 1; }" +
"}"
PartialParser
protected PartialParser()
- Constructor should not be called.
makeExpression
public static Expression makeExpression(String str) throws PtreeException
- Makes a ptree node from the string like :
"i + 3"
or :
"f()"
- Returns:
- the expression node which the specified string
represents.
- Throws: PtreeException
- if any critical error occurs.
makeStatement
public static Statement makeStatement(String str) throws PtreeException
- Makes a ptree node from the string like :
"i++;"
or :
"for(;;){ f(); }"
- Returns:
- the statement node which the specified string
represents.
- Throws: PtreeException
- if any critical error occurs.
makeStatementList
public static StatementList makeStatementList(String str) throws PtreeException
- Makes ptree node from the string like :
"i++; j = 3;"
- Returns:
- the statements node which the specified string
represents.
- Throws: PtreeException
- if any critical error occurs.
makeMemberDeclaration
public static MemberDeclaration makeMemberDeclaration(String str) throws PtreeException
- Makes ptree node from the string like :
"int f(){ return 1; }"
or :
"public String str;"
- Returns:
- the statements node which the specified string
represents.
- Throws: PtreeException
- if any critical error occurs.
makeMemberDeclarationList
public static MemberDeclarationList makeMemberDeclarationList(String str) throws PtreeException
- Makes a ptree node from the string like :
"int f(){ return 1; }" +
"public String str;"
- Returns:
- the type declarations list node which the specified string
represents.
- Throws: PtreeException
- if any critical error occurs.
makeTypeDeclaration
public static TypeDeclaration makeTypeDeclaration(String str) throws PtreeException
- Makes a TypeDeclaration object from the string like :
"public class Test{" +
" public String str;" +
" private int f(){ return 1; }" +
"}"
- Returns:
- the typedeclaration node which the specified string
represents.
- Throws: PtreeException
- if any critical error occurs.
makeCompilationUnit
public static CompilationUnit makeCompilationUnit(String str) throws PtreeException
- Makes a CompilationUnit object from the string.
- Returns:
- the comilation unit node which the specified string
represents.
- Throws: PtreeException
- if any critical error occurs.
All Packages Class Hierarchy This Package Previous Next Index