Package org.eclipse.handly.model.adapter
Class NullContentAdapter
- java.lang.Object
-
- org.eclipse.handly.model.adapter.NullContentAdapter
-
- All Implemented Interfaces:
IContentAdapter
public class NullContentAdapter extends java.lang.Object implements IContentAdapter
A content adapter that does nothing in terms of actual adaptation: it merely defines identity transformation between allIElements.
-
-
Field Summary
Fields Modifier and Type Field Description static IContentAdapterINSTANCEThe sole instance of the null content adapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IElementadapt(java.lang.Object element)Returns theIElementthat corresponds to the given element.java.lang.ObjectgetCorrespondingElement(IElement element)Returns the element that corresponds to the givenIElement.
-
-
-
Field Detail
-
INSTANCE
public static final IContentAdapter INSTANCE
The sole instance of the null content adapter.
-
-
Method Detail
-
adapt
public IElement adapt(java.lang.Object element)
Description copied from interface:IContentAdapterReturns theIElementthat corresponds to the given element.- Specified by:
adaptin interfaceIContentAdapter- Parameters:
element- may benull- Returns:
- the corresponding
IElement, ornullif none
-
getCorrespondingElement
public java.lang.Object getCorrespondingElement(IElement element)
Description copied from interface:IContentAdapterReturns the element that corresponds to the givenIElement.- Specified by:
getCorrespondingElementin interfaceIContentAdapter- Parameters:
element- anIElement(may benull)- Returns:
- the corresponding element, or
nullif none
-
-