org.stjs.generator
Class STJSClass
java.lang.Object
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
CLASS_PROP
public static final String CLASS_PROP
- See Also:
- Constant Field Values
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 -
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.