org.bbqjs.compiler.language
Class CompilableLanguageFile

java.lang.Object
  extended by org.bbqjs.compiler.AbstractCompilableFile
      extended by org.bbqjs.compiler.language.CompilableLanguageFile
All Implemented Interfaces:
CompilableFile, LanguageFile

public class CompilableLanguageFile
extends AbstractCompilableFile
implements LanguageFile


Field Summary
 
Fields inherited from class org.bbqjs.compiler.AbstractCompilableFile
contents, includedFiles, sourceRoots
 
Constructor Summary
CompilableLanguageFile(String className, URL javaScriptInputFile, Locale locale, Locale defaultLocale, String[] sourceRoots)
           
 
Method Summary
protected  void encounteredInclude(String className, URL javaScriptFile)
           
protected  URL findResource(String className, Locale locale)
           
 Properties getLanguageTranslations()
           
protected  URL loadFromClassPath(String className, Locale locale)
           
protected  URL loadFromFile(String className, Locale locale)
           
static void setLogger(org.slf4j.Logger log)
           
 void writeTo(OutputStream outputStream)
          Calling this method will cause the contents of the file to be written into the output stream.
 
Methods inherited from class org.bbqjs.compiler.AbstractCompilableFile
encounteredInclude, equals, findIncludes, getFilePath, getIncludedFiles, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompilableLanguageFile

public CompilableLanguageFile(String className,
                              URL javaScriptInputFile,
                              Locale locale,
                              Locale defaultLocale,
                              String[] sourceRoots)
                       throws IOException
Throws:
IOException
Method Detail

setLogger

public static void setLogger(org.slf4j.Logger log)

encounteredInclude

protected void encounteredInclude(String className,
                                  URL javaScriptFile)
                           throws IOException
Overrides:
encounteredInclude in class AbstractCompilableFile
Throws:
IOException

getLanguageTranslations

public Properties getLanguageTranslations()
                                   throws IOException
Specified by:
getLanguageTranslations in interface LanguageFile
Throws:
IOException

findResource

protected URL findResource(String className,
                           Locale locale)
                    throws IOException
Throws:
IOException

loadFromClassPath

protected URL loadFromClassPath(String className,
                                Locale locale)

loadFromFile

protected URL loadFromFile(String className,
                           Locale locale)
                    throws IOException
Throws:
IOException

writeTo

public void writeTo(OutputStream outputStream)
             throws IOException
Description copied from interface: CompilableFile
Calling this method will cause the contents of the file to be written into the output stream.

Specified by:
writeTo in interface CompilableFile
Overrides:
writeTo in class AbstractCompilableFile
Throws:
IOException


Copyright © 2012. All Rights Reserved.