Class HtmlElementAdapter<M extends HtmlElement,T extends HTMLElement<?>>
- java.lang.Object
-
- org.eclipse.emf.common.notify.impl.AdapterImpl
-
- org.nasdanika.html.model.html.gen.HtmlElementAdapter<M,T>
-
- Type Parameters:
M-T-
- All Implemented Interfaces:
Adapter,Adapter.Internal
- Direct Known Subclasses:
HtmlElementConsumerFactoryAdapter,HtmlElementSupplierFactoryAdapter
public abstract class HtmlElementAdapter<M extends HtmlElement,T extends HTMLElement<?>> extends AdapterImpl
Base class for HTML Element adapters providing common functionality- Author:
- Pavel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
Adapter.Internal
-
-
Field Summary
Fields Modifier and Type Field Description protected AdapterFactoryadapterFactory-
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHtmlElementAdapter(M htmlElement, AdapterFactory adapterFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends HTMLElement<?>>
org.nasdanika.common.Function<org.nasdanika.common.BiSupplier<T,Map<EStructuralFeature,Object>>,T>createApplyAttributesAndContentFunction(org.nasdanika.common.Context context)protected org.nasdanika.common.Function<T,T>createConfigureFunction(org.nasdanika.common.Context context)Creates a function which configures the element and returns it.protected List<EObject>getContent()This implementation returns target content.protected AdaptergetRegisteredAdapter(EObject eObject, Object type)protected AdapterFactorygetRootAdapterFactory()MgetTarget()-
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
isAdapterForType, notifyChanged, setTarget, unsetTarget
-
-
-
-
Field Detail
-
adapterFactory
protected AdapterFactory adapterFactory
-
-
Constructor Detail
-
HtmlElementAdapter
protected HtmlElementAdapter(M htmlElement, AdapterFactory adapterFactory)
-
-
Method Detail
-
getRootAdapterFactory
protected AdapterFactory getRootAdapterFactory()
-
getRegisteredAdapter
protected Adapter getRegisteredAdapter(EObject eObject, Object type)
-
createConfigureFunction
protected org.nasdanika.common.Function<T,T> createConfigureFunction(org.nasdanika.common.Context context)
Creates a function which configures the element and returns it. This implementation applies attributes and adds content. Override to implement additional configuration. You may chain configuration functions with.then- Parameters:
context-- Returns:
-
getContent
protected List<EObject> getContent()
This implementation returns target content. Override to customize.- Returns:
-
createApplyAttributesAndContentFunction
public static <T extends HTMLElement<?>> org.nasdanika.common.Function<org.nasdanika.common.BiSupplier<T,Map<EStructuralFeature,Object>>,T> createApplyAttributesAndContentFunction(org.nasdanika.common.Context context)
-
-