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

Constructor Index

 o PartialParser()
Constructor should not be called.

Method Index

 o makeCompilationUnit(String)
Makes a CompilationUnit object from the string.
 o makeExpression(String)
Makes a ptree node from the string like :
     "i + 3"
 

or :
     "f()"
 

 o makeMemberDeclaration(String)
Makes ptree node from the string like :
     "int f(){ return 1; }"
 

or :
     "public String str;"
 

 o makeMemberDeclarationList(String)
Makes a ptree node from the string like :
     "int f(){ return 1; }" +
     "public String str;"
 

 o makeStatement(String)
Makes a ptree node from the string like :
     "i++;"
 

or :
     "for(;;){ f(); }"
 

 o makeStatementList(String)
Makes ptree node from the string like :
     "i++; j = 3;"
 

 o makeTypeDeclaration(String)
Makes a TypeDeclaration object from the string like :
     "public class Test{" +
     "  public String str;" +
     "  private int f(){ return 1; }" +
     "}"
 

Constructors

 o PartialParser
 protected PartialParser()
Constructor should not be called.

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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