net.sf.regain.crawler.preparator.java
Class JavaParser
java.lang.Object
net.sf.regain.crawler.preparator.java.JavaParser
public class JavaParser
- extends Object
Parses Java source code for indexing
The following information will be
extracted: class name, member names, comments (javadoc)
- Author:
- Renuka Sindhgatta, http://www.oreillynet.com/pub/au/2554, Thomas Tesche
Field Summary |
private JClassEnum |
_class
|
private org.eclipse.jdt.core.dom.ASTParser |
_parser
|
private org.eclipse.jdt.core.dom.CompilationUnit |
_unit
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_parser
private org.eclipse.jdt.core.dom.ASTParser _parser
_unit
private org.eclipse.jdt.core.dom.CompilationUnit _unit
_class
private JClassEnum _class
JavaParser
public JavaParser()
setSource
public void setSource(String sourceStr)
throws RegainException
- Member sets the source for the parser and creates a compilation unit
- Parameters:
sourceStr
- the source code
- Throws:
RegainException
- if building of a compilation unit
failed
getImportDeclarations
public ArrayList getImportDeclarations()
getComments
public List getComments()
getDeclaredClass
public JClassEnum getDeclaredClass()
setEnumInformation
private void setEnumInformation(JClassEnum cls,
org.eclipse.jdt.core.dom.EnumDeclaration declaration)
setClassInformation
private void setClassInformation(JClassEnum cls,
org.eclipse.jdt.core.dom.TypeDeclaration declaration)
addMethods
private void addMethods(JClassEnum cls,
org.eclipse.jdt.core.dom.TypeDeclaration object)
Regain 2.1.0-STABLE, Copyright (C) 2004-2010 Til Schneider, www.murfman.de, Thomas Tesche, www.clustersystems.info