Class GroovyTypeLoader
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.GroovyTypeLoader
-
public class GroovyTypeLoader extends Object
Load web types extracted from Groovy source files. Types are cached in META-INF/groovy-web-types. When types are reloaded this file will be removed.- Author:
- Bogdan Stefanescu
-
-
Constructor Summary
Constructors Constructor Description GroovyTypeLoader(WebEngine engine, TypeRegistry typeReg, File root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flushCache()
void
load()
protected TypeDescriptor
loadType(String className)
Gets a type descriptor given an absolute className.protected TypeDescriptor
loadTypeAndRecord(Writer cache, String className)
Loads a type and cache it.protected void
scan(File root, String path, Writer cache)
-
-
-
Field Detail
-
WEB_TYPES_FILE
public static final String WEB_TYPES_FILE
- See Also:
- Constant Field Values
-
typeReg
protected final TypeRegistry typeReg
-
-
Constructor Detail
-
GroovyTypeLoader
public GroovyTypeLoader(WebEngine engine, TypeRegistry typeReg, File root)
-
-
Method Detail
-
flushCache
public void flushCache()
-
load
public void load()
-
loadTypeAndRecord
protected TypeDescriptor loadTypeAndRecord(Writer cache, String className) throws ClassNotFoundException, IOException
Loads a type and cache it.- Throws:
ClassNotFoundException
IOException
-
loadType
protected TypeDescriptor loadType(String className) throws ClassNotFoundException
Gets a type descriptor given an absolute className.If this class doesn't define a type or type adapter, return null.
- Throws:
ClassNotFoundException
-
-