Package net.officefloor.polyglot.scala
Class ScalaFunctionSectionSource
- java.lang.Object
-
- net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
-
- net.officefloor.plugin.section.clazz.AbstractFunctionSectionSource
-
- net.officefloor.polyglot.scala.ScalaFunctionSectionSource
-
- All Implemented Interfaces:
SectionSource
public class ScalaFunctionSectionSource extends AbstractFunctionSectionSource
Scala functionSectionSource
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.plugin.section.clazz.AbstractFunctionSectionSource
AbstractFunctionSectionSource.ObjectForMethod
-
Nested classes/interfaces inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
AbstractSectionSource.SpecificationContext
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_FUNCTION_NAME
Property
name of the Scala function to use.-
Fields inherited from class net.officefloor.plugin.section.clazz.AbstractFunctionSectionSource
CLASS_OBJECT_NAME
-
-
Constructor Summary
Constructors Constructor Description ScalaFunctionSectionSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SectionFunctionNamespace
adddSectionFunctionNamespace(java.lang.String namespace, java.lang.Class<?> sectionClass)
Adds theSectionFunctionNamespace
.protected java.lang.Class<?>
getSectionClass(java.lang.String sectionClassName)
Obtains the section class.protected boolean
isIncludeManagedFunctionType(ManagedFunctionType<?,?> functionType)
Indicates if includeManagedFunctionType
.protected FunctionNamespaceType
loadFunctionNamespaceType(java.lang.String namespace, java.lang.Class<?> sectionClass)
Loads theFunctionNamespaceType
.protected AbstractFunctionSectionSource.ObjectForMethod
loadObjectForMethod(java.lang.Class<?> sectionClass)
protected void
loadSpecification(AbstractSectionSource.SpecificationContext context)
Loads theSectionSourceSpecification
.void
sourceSection(SectionDesigner designer, SectionSourceContext context)
Sources theOfficeSection
by constructing it via the inputSectionDesigner
.-
Methods inherited from class net.officefloor.plugin.section.clazz.AbstractFunctionSectionSource
createClassManagedObject, enrichFunction, extractClassManagedObjectDependencies, getContext, getDesigner, getFunctionByName, getFunctionByTypeName, getFunctionName, getFunctionTypeByName, getManagedObject, getOrCreateInput, getOrCreateObject, getOrCreateOutput, getOrCreateSubSection, getSectionClassName, linkFunctionEscalation, linkFunctionFlow, linkFunctionFlow, linkFunctionObject, linkNextFunction, registerFunctionByTypeName
-
Methods inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
getSpecification
-
-
-
-
Field Detail
-
PROPERTY_FUNCTION_NAME
public static final java.lang.String PROPERTY_FUNCTION_NAME
Property
name of the Scala function to use.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadSpecification
protected void loadSpecification(AbstractSectionSource.SpecificationContext context)
Description copied from class:AbstractSectionSource
Loads theSectionSourceSpecification
.- Overrides:
loadSpecification
in classAbstractFunctionSectionSource
- Parameters:
context
-AbstractSectionSource.SpecificationContext
.
-
sourceSection
public void sourceSection(SectionDesigner designer, SectionSourceContext context) throws java.lang.Exception
Description copied from interface:SectionSource
Sources theOfficeSection
by constructing it via the inputSectionDesigner
.- Specified by:
sourceSection
in interfaceSectionSource
- Overrides:
sourceSection
in classAbstractFunctionSectionSource
- Parameters:
designer
-SectionDesigner
to construct the structure of theOfficeSection
.context
-SectionSourceContext
to source details to construct theOfficeSection
.- Throws:
java.lang.Exception
- If fails to construct theOfficeSection
.
-
getSectionClass
protected java.lang.Class<?> getSectionClass(java.lang.String sectionClassName) throws java.lang.Exception
Description copied from class:AbstractFunctionSectionSource
Obtains the section class.- Overrides:
getSectionClass
in classAbstractFunctionSectionSource
- Parameters:
sectionClassName
- Name of the section class.- Returns:
- Section class.
- Throws:
java.lang.Exception
- If fails to obtain the section class.
-
loadObjectForMethod
protected AbstractFunctionSectionSource.ObjectForMethod loadObjectForMethod(java.lang.Class<?> sectionClass) throws java.lang.Exception
Description copied from class:AbstractFunctionSectionSource
- Overrides:
loadObjectForMethod
in classAbstractFunctionSectionSource
- Parameters:
sectionClass
-Class
of theObject
.- Returns:
AbstractFunctionSectionSource.ObjectForMethod
. May benull
for noObject
forMethod
.- Throws:
java.lang.Exception
- If fails to loadObject
for theMethod
.
-
loadFunctionNamespaceType
protected FunctionNamespaceType loadFunctionNamespaceType(java.lang.String namespace, java.lang.Class<?> sectionClass)
Description copied from class:AbstractFunctionSectionSource
Loads theFunctionNamespaceType
.- Overrides:
loadFunctionNamespaceType
in classAbstractFunctionSectionSource
- Parameters:
namespace
- Namespace.sectionClass
- SectionClass
.- Returns:
FunctionNamespaceType
.
-
adddSectionFunctionNamespace
protected SectionFunctionNamespace adddSectionFunctionNamespace(java.lang.String namespace, java.lang.Class<?> sectionClass)
Description copied from class:AbstractFunctionSectionSource
Adds theSectionFunctionNamespace
.- Overrides:
adddSectionFunctionNamespace
in classAbstractFunctionSectionSource
- Parameters:
namespace
- Namespace.sectionClass
- SectionClass
.- Returns:
SectionFunctionNamespace
.
-
isIncludeManagedFunctionType
protected boolean isIncludeManagedFunctionType(ManagedFunctionType<?,?> functionType)
Description copied from class:AbstractFunctionSectionSource
Indicates if includeManagedFunctionType
.- Overrides:
isIncludeManagedFunctionType
in classAbstractFunctionSectionSource
- Parameters:
functionType
-ManagedFunctionType
.- Returns:
true
include theManagedFunctionType
.
-
-