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
FieldsFields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHtmlElementAdapter(M htmlElement, AdapterFactory adapterFactory) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends HTMLElement<?>>
org.nasdanika.common.Function<org.nasdanika.common.Supplier.FunctionResult<T,Map<EStructuralFeature, Object>>, T> createApplyAttributesAndContentFunction(org.nasdanika.common.Context context) createConfigureFunction(org.nasdanika.common.Context context) Creates a function which configures the element and returns it.This implementation returns target content.protected AdaptergetRegisteredAdapter(EObject eObject, Object type) protected AdapterFactoryMethods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
isAdapterForType, notifyChanged, setTarget, unsetTarget
-
Field Details
-
adapterFactory
-
-
Constructor Details
-
HtmlElementAdapter
-
-
Method Details
-
getRootAdapterFactory
-
getRegisteredAdapter
-
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
This implementation returns target content. Override to customize.- Returns:
-
createApplyAttributesAndContentFunction
public static <T extends HTMLElement<?>> org.nasdanika.common.Function<org.nasdanika.common.Supplier.FunctionResult<T,Map<EStructuralFeature, createApplyAttributesAndContentFunctionObject>>, T> (org.nasdanika.common.Context context) -
getTarget
- Specified by:
getTargetin interfaceAdapter- Overrides:
getTargetin classAdapterImpl
-