|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teatrove.tea.compiler.TemplateRepository
public class TemplateRepository
| Nested Class Summary | |
|---|---|
class |
TemplateRepository.TemplateInfo
Template metadata container object. |
| Field Summary | |
|---|---|
static String |
REPOSITORY_FILENAME
|
| Method Summary | |
|---|---|
void |
createRepositoryFile()
Persist the current state of the repository to disk. |
static String |
formatTypeDesc(TypeDesc d)
Type desc format beautifier |
TemplateRepository.TemplateInfo[] |
getCallers(String templateName)
Retrieve the metadata for all templates that call the named template. |
String[] |
getCallersNeedingRecompile(String[] names,
Compiler compiler)
Retrieve the callers of a list of given template names where the source file can be located (delegated to the compiler), and the signature of given template(s) has changed since the last call to update. |
static TemplateRepository |
getInstance()
Get repository instance. |
TemplateRepository.TemplateInfo[] |
getMethodCallers(MethodDescriptor methodDesc)
Retrieve the metadata for all templates that call the specified method. |
TemplateRepository.TemplateInfo |
getTemplateInfo(String templateName)
Retrieve the metadata for a given template. |
TemplateRepository.TemplateInfo |
getTemplateInfoForClassFile(File f)
Retrieves template metadata for a class file. |
TemplateRepository.TemplateInfo[] |
getTemplateInfos()
Retrieve the metadata for all templates. |
static void |
init(File rootClassesDir,
String rootPackage)
Initalizes and loads the repository. |
static boolean |
isInitialized()
Check to see if the repository was initialized (singleton instance create). |
void |
update(String[] templatesChanged)
Synchronize the repository state with respect to the named template class file(s). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String REPOSITORY_FILENAME
| Method Detail |
|---|
public static void init(File rootClassesDir,
String rootPackage)
rootClassesDir - The root template classes directory.rootPackage - The root package name (org.teatrove.teaservlet.template).public static boolean isInitialized()
public static TemplateRepository getInstance()
public TemplateRepository.TemplateInfo getTemplateInfoForClassFile(File f)
throws IOException
f - The class file object.
IOException
public void createRepositoryFile()
throws IOException
IOExceptionpublic TemplateRepository.TemplateInfo[] getCallers(String templateName)
templateName - The name of the template.
public TemplateRepository.TemplateInfo[] getMethodCallers(MethodDescriptor methodDesc)
methodDesc - The method descriptor to find.
public TemplateRepository.TemplateInfo getTemplateInfo(String templateName)
templateName - The name of the template.
public TemplateRepository.TemplateInfo[] getTemplateInfos()
public String[] getCallersNeedingRecompile(String[] names,
Compiler compiler)
throws IOException
names - The names of the templates to check.compiler - The compiler instance.
IOException
public void update(String[] templatesChanged)
throws IOException
templatesChanged - The templates to update.
IOExceptionpublic static String formatTypeDesc(TypeDesc d)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||