public class ReactJava
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
bInitialized |
protected static IReactCodeGenerator |
generator |
protected static java.util.Map<java.lang.String,java.lang.String> |
injectedStylesheets |
static java.lang.String |
kFACTORY |
static java.lang.String |
kMARKUP |
static java.lang.String |
kSTYLES |
Constructor and Description |
---|
ReactJava() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addBaseTag()
The React router and perhaps other functionality depends upon the
base hRef assignment to accommodate a base url offset from the
hostname for the calculation of relative urls.
|
static ReactElement |
boot(AppComponentTemplate app)
Boot react.
|
static java.util.Map<java.lang.String,java.lang.String> |
clearInjectedStylesheets()
Remove all injected stylesheets and clear the list.
|
static <P extends Properties> |
createElement(java.lang.Class type,
IConfiguration configuration)
Convenience method to create react element of the specified
component class.
|
static <P extends Properties> |
createElement(java.lang.Class type,
IConfiguration configuration,
ReactElement... children) |
static <P extends Properties> |
createElement(Component component)
Convenience method to create react element of the specified
component.
|
static <P extends Properties> |
createElement(INativeComponentConstructor type,
P props)
Convenience method to create react element of the specified class.
|
static <P extends Properties> |
createElement(INativeComponentConstructor type,
P props,
ReactElement... children) |
static <P extends Properties> |
createElement(INativeRenderableComponent<P> type,
P props)
Convenience method to create react element of the specified class.
|
static <P extends Properties> |
createElement(INativeRenderableComponent<P> type,
P props,
ReactElement... children) |
static <P extends Properties> |
createElement(INativeRenderableComponent<P> type,
P props,
java.lang.String value) |
static <P extends Properties> |
createElement(java.lang.String type,
P props)
Convenience method to create react element of the specified class.
|
static <P extends Properties> |
createElement(java.lang.String type,
P props,
ReactElement... children) |
static <P extends Properties> |
createElement(java.lang.String type,
P props,
java.lang.String value) |
static void |
ensureComponentStyles(Component component,
boolean bUpdate)
Get native component.
|
static IReactCodeGenerator |
getCodeGenerator()
Get ReactJava code generator.
|
static java.util.function.Function<Properties,Component> |
getComponentFactory(java.lang.String classname)
Get factory supplier for specified classname.
|
static <P extends Properties> |
getComponentFcn(Component component)
Get component function for specified component.
|
static java.util.Map<java.lang.String,java.lang.String> |
getInjectedStylesheets()
Get stylesheets.
|
static boolean |
getIsWebPlatform()
Convenience method to get whether is web platform.
|
static java.lang.String |
getPlatformProvider()
Get platform provider.
|
static <T> T |
getProvider(java.lang.Class interfaceType)
Get provider for specified interface.
|
static java.util.function.Function<Properties,IProvider> |
getProvider(java.lang.String classname)
Get factory for specified classname.
|
static <P extends Properties> |
getRenderableComponent(Component component)
Get native component.
|
static <P extends Properties> |
getRenderableComponent(java.lang.String classname)
Get native component.
|
protected static void |
initialize(IConfiguration configuration,
java.lang.Object requestToken,
APIRequestor requestor)
Initialize.
|
static boolean |
initialized()
Test whether initialized.
|
static java.lang.String |
styleIdFromClassname(java.lang.String classname)
Get style element id from component classname.
|
public static final java.lang.String kFACTORY
public static final java.lang.String kMARKUP
public static final java.lang.String kSTYLES
protected static boolean bInitialized
protected static IReactCodeGenerator generator
protected static java.util.Map<java.lang.String,java.lang.String> injectedStylesheets
protected static void addBaseTag()
public static ReactElement boot(AppComponentTemplate app)
app
- apppublic static java.util.Map<java.lang.String,java.lang.String> clearInjectedStylesheets()
public static <P extends Properties> ReactElement createElement(java.lang.Class type, IConfiguration configuration)
type
- component classpublic static <P extends Properties> ReactElement createElement(java.lang.Class type, IConfiguration configuration, ReactElement... children)
public static <P extends Properties> ReactElement createElement(Component component)
component
- target componentpublic static <P extends Properties> ReactElement createElement(java.lang.String type, P props)
type
- standard html tagprops
- propertiespublic static <P extends Properties> ReactElement createElement(java.lang.String type, P props, java.lang.String value)
public static <P extends Properties> ReactElement createElement(java.lang.String type, P props, ReactElement... children)
public static <P extends Properties> ReactElement createElement(INativeRenderableComponent<P> type, P props)
type
- standard html tagprops
- propertiespublic static <P extends Properties> ReactElement createElement(INativeRenderableComponent<P> type, P props, java.lang.String value)
public static <P extends Properties> ReactElement createElement(INativeRenderableComponent<P> type, P props, ReactElement... children)
public static <P extends Properties> ReactElement createElement(INativeComponentConstructor type, P props) throws java.lang.Exception
type
- standard html tagprops
- propertiesjava.lang.Exception
public static <P extends Properties> ReactElement createElement(INativeComponentConstructor type, P props, ReactElement... children) throws java.lang.Exception
java.lang.Exception
public static void ensureComponentStyles(Component component, boolean bUpdate)
component
- componentbUpdate
- iff true, updatepublic static IReactCodeGenerator getCodeGenerator()
public static java.util.function.Function<Properties,Component> getComponentFactory(java.lang.String classname)
classname
- classnamepublic static <P extends Properties> java.util.function.Function<P,ReactElement> getComponentFcn(Component component)
component
- target componentpublic static java.util.Map<java.lang.String,java.lang.String> getInjectedStylesheets()
public static boolean getIsWebPlatform()
public static java.lang.String getPlatformProvider()
public static <P extends Properties> INativeRenderableComponent getRenderableComponent(java.lang.String classname)
public static <P extends Properties> INativeRenderableComponent getRenderableComponent(Component component)
public static <T> T getProvider(java.lang.Class interfaceType)
public static java.util.function.Function<Properties,IProvider> getProvider(java.lang.String classname)
classname
- classnameprotected static void initialize(IConfiguration configuration, java.lang.Object requestToken, APIRequestor requestor)
configuration
- configurationrequestToken
- request tokenrequestor
- requestorpublic static boolean initialized()
public static java.lang.String styleIdFromClassname(java.lang.String classname)
classname
- component classname