org.clearsilver.jni
Class JniClearsilverFactory

java.lang.Object
  extended by org.clearsilver.jni.JniClearsilverFactory
All Implemented Interfaces:
ClearsilverFactory

public class JniClearsilverFactory
extends Object
implements ClearsilverFactory

Factory implementation for the original JNI version of Java Clearsilver


Constructor Summary
JniClearsilverFactory()
          Default constructor.
JniClearsilverFactory(boolean unwrapDelegatedHdfs)
          Constructor that takes the option whether to unwrap all DelegatedHdf objects before passing the HDF object to the CS implementation constructor.
 
Method Summary
 CS newCs(HDF hdf)
          Create a new CS object.
 CS newCs(HDF hdf, HDF globalHdf)
          Create a new CS object.
 HDF newHdf()
          Create a new HDF object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JniClearsilverFactory

public JniClearsilverFactory()
Default constructor. Any DelegatedHdfs passed to newCs(org.clearsilver.HDF) will be fully unwrapped before being passed to CS implementation constructor.


JniClearsilverFactory

public JniClearsilverFactory(boolean unwrapDelegatedHdfs)
Constructor that takes the option whether to unwrap all DelegatedHdf objects before passing the HDF object to the CS implementation constructor.
Developers that want strict checking that the HDF passed to newCs matches HDF objects constructed by newHDF may want to pass in false.

Parameters:
unwrapDelegatedHdfs - true if HDFs passed to newCs(org.clearsilver.HDF) should be unwrapped if they are DelegatedHdf objects, false otherwise.
Method Detail

newCs

public CS newCs(HDF hdf)
Create a new CS object.

Specified by:
newCs in interface ClearsilverFactory
Parameters:
hdf - the HDF object to use in constructing the CS object.
Returns:
a new CS object

newCs

public CS newCs(HDF hdf,
                HDF globalHdf)
Create a new CS object. Also checks and unwraps any DelegatedHdfs passed into the method.

Specified by:
newCs in interface ClearsilverFactory
Parameters:
hdf - the HDF object to use in constructing the CS object.
globalHdf - the global HDF object to use in constructing the CS object.
Returns:
a new CS object

newHdf

public HDF newHdf()
Create a new HDF object.

Specified by:
newHdf in interface ClearsilverFactory
Returns:
a new HDF object


Copyright © 2010-2012 Google. All Rights Reserved.