Class CompilationFactory
- java.lang.Object
-
- ca.cgjennings.apps.arkham.plugins.typescript.CompilationFactory
-
public final class CompilationFactory extends java.lang.Object
Creates compilation roots for source files. The returned roots may be shared.- Author:
- Chris Jennings
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CompilationRoot
createStandalone()
static CompilationRoot
forFile(java.io.File file)
Returns a compilation root for the specified file.static CompilationRoot
forMember(Member member)
Returns a shared compilation root for the project member.static CompilationRoot[]
getProjectRoots()
Returns an array of all compilation roots created for the open project.
-
-
-
Method Detail
-
createStandalone
public static CompilationRoot createStandalone()
-
getProjectRoots
public static CompilationRoot[] getProjectRoots()
Returns an array of all compilation roots created for the open project. This returns all of the shared roots that have been initialized so far, not all of the possible roots.- Returns:
- an array of the compilation roots
-
forMember
public static CompilationRoot forMember(Member member)
Returns a shared compilation root for the project member. Typically, each plug-in task folder has its own separate root, and there is one root for the project as a whole.- Parameters:
member
- the member to get a compilation root for- Returns:
- the shared compilation root
-
forFile
public static CompilationRoot forFile(java.io.File file)
Returns a compilation root for the specified file. If the file is part of the open project, returns the same root that would be returned for the file's project member. Otherwise, returns a new standalone root.- Parameters:
file
- the file to obtain a compilation root for- Returns:
- the file's compilation root
-
-