Module org.praxislive.code
Package org.praxislive.code
Class CodeFactory.Base<B extends CodeDelegate>
java.lang.Object
org.praxislive.code.CodeFactory.Base<B>
- Type Parameters:
B- base delegate type
- Enclosing class:
CodeFactory<D extends CodeDelegate>
Base code factory for a given base delegate class. Encompasses shared
configuration, component and context creation. Create specific
CodeFactory instances with the create methods. See
CodeFactory.base(java.lang.Class, java.util.List, java.util.function.BiFunction)
and
CodeFactory.containerBase(java.lang.Class, java.util.List, java.util.function.BiFunction)-
Method Summary
Modifier and TypeMethodDescriptionQuery the base delegate class that all CodeFactory instances will create subclasses of.Query the base imports that all CodeFactory instance will add to the source body.Create a CodeFactory with the given component type, default precompiled delegate class, and source class body corresponding to the compiled delegate.Create a CodeFactory with the given component type and default source, without a precompiled delegate class.create(ComponentType type, Class<? extends B> defaultDelegate, String defaultSource) Create a CodeFactory with the given component type, default precompiled delegate class, and source class body corresponding to the compiled delegate.create(ComponentType type, String defaultSource) Create a CodeFactory with the given component type and default source, without a precompiled delegate class.
-
Method Details
-
baseClass
Query the base delegate class that all CodeFactory instances will create subclasses of.- Returns:
- base delegate class
-
baseImports
Query the base imports that all CodeFactory instance will add to the source body.- Returns:
- base imports
-
create
Create a CodeFactory with the given component type and default source, without a precompiled delegate class.- Parameters:
type- component typedefaultSource- default source code- Returns:
- code factory
-
create
Create a CodeFactory with the given component type and default source, without a precompiled delegate class.- Parameters:
type- component typedefaultSource- default source code- Returns:
- code factory
-
create
Create a CodeFactory with the given component type, default precompiled delegate class, and source class body corresponding to the compiled delegate.- Parameters:
type- component type as String, passed toComponentType.of(java.lang.String)defaultDelegate- default delegate classdefaultSource- default source class body- Returns:
- code factory
-
create
public CodeFactory<B> create(ComponentType type, Class<? extends B> defaultDelegate, String defaultSource) Create a CodeFactory with the given component type, default precompiled delegate class, and source class body corresponding to the compiled delegate.- Parameters:
type- component typedefaultDelegate- default delegate classdefaultSource- default source class body- Returns:
- code factory
-