org.stjs.generator
Class STJSClass

java.lang.Object
  extended by org.stjs.generator.STJSClass
All Implemented Interfaces:
ClassWithJavascript

public class STJSClass
extends Object
implements ClassWithJavascript

This class represents a class and the corresponding generated javascript file. The information about dependencies and sources are stored at generation time in a properties file that has as name [class-name].stjs (and it's packed along with the source file in the same folder). Thus, if a STJS library is built, it will be delivered with all this information, as the original Java code will no longer be available with the library.

Author:
acraciun

Field Summary
static String CLASS_PROP
           
 
Constructor Summary
STJSClass(DependencyResolver dependencyResolver, ClassLoader classLoader, String className)
          constructor for loading
STJSClass(DependencyResolver dependencyResolver, File targetFolder, String className)
          constructor for storage
 
Method Summary
 boolean equals(Object obj)
           
 String getClassName()
           
 List<ClassWithJavascript> getDirectDependencies()
           
 List<URI> getJavascriptFiles()
           
 File getStjsPropertiesFile()
           
 int hashCode()
           
 void setDependencies(Collection<String> deps)
           
 void setGeneratedJavascriptFile(URI generatedJavascriptFile)
           
 void store()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_PROP

public static final String CLASS_PROP
See Also:
Constant Field Values
Constructor Detail

STJSClass

public STJSClass(DependencyResolver dependencyResolver,
                 File targetFolder,
                 String className)
constructor for storage


STJSClass

public STJSClass(DependencyResolver dependencyResolver,
                 ClassLoader classLoader,
                 String className)
constructor for loading

Parameters:
builtProjectClassLoader -
className -
Method Detail

getStjsPropertiesFile

public File getStjsPropertiesFile()

store

public void store()

setDependencies

public void setDependencies(Collection<String> deps)

setGeneratedJavascriptFile

public void setGeneratedJavascriptFile(URI generatedJavascriptFile)

getClassName

public String getClassName()
Specified by:
getClassName in interface ClassWithJavascript

getJavascriptFiles

public List<URI> getJavascriptFiles()
Specified by:
getJavascriptFiles in interface ClassWithJavascript

getDirectDependencies

public List<ClassWithJavascript> getDirectDependencies()
Specified by:
getDirectDependencies in interface ClassWithJavascript

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2014. All Rights Reserved.