public class SourceFinder extends Object
| Constructor and Description |
|---|
SourceFinder(Project project) |
| Modifier and Type | Method and Description |
|---|---|
SourceFile |
findSourceFile(SourceLineAnnotation source) |
SourceFile |
findSourceFile(String packageName,
String fileName)
Open a source file in given package.
|
static String |
getCanonicalName(SourceLineAnnotation source) |
static String |
getCanonicalName(String packageName,
String fileName) |
static String |
getOrGuessSourceFile(SourceLineAnnotation source) |
static String |
getPlatformName(SourceLineAnnotation source) |
static String |
getPlatformName(String packageName,
String fileName) |
Project |
getProject() |
boolean |
hasSourceFile(SourceLineAnnotation source) |
boolean |
hasSourceFile(String packageName,
String fileName) |
InputStream |
openSource(SourceLineAnnotation source) |
InputStream |
openSource(String packageName,
String fileName)
Open an input stream on a source file in given package.
|
public SourceFinder(Project project)
public Project getProject()
public InputStream openSource(String packageName, String fileName) throws IOException
packageName - the name of the package containing the class whose source file
is givenfileName - the unqualified name of the source fileIOException - if a matching source file cannot be foundpublic InputStream openSource(SourceLineAnnotation source) throws IOException
IOExceptionpublic SourceFile findSourceFile(SourceLineAnnotation source) throws IOException
IOExceptionpublic SourceFile findSourceFile(String packageName, String fileName) throws IOException
packageName - the name of the package containing the class whose source file
is givenfileName - the unqualified name of the source fileIOException - if a matching source file cannot be foundpublic static String getPlatformName(SourceLineAnnotation source)
public static String getCanonicalName(SourceLineAnnotation source)
public static String getOrGuessSourceFile(SourceLineAnnotation source)
public boolean hasSourceFile(SourceLineAnnotation source)
Copyright © 2003–2015. All rights reserved.