Package org.ec4j.core.model
Class Adaptable.DefaultAdaptable
java.lang.Object
org.ec4j.core.model.Adaptable.DefaultAdaptable
- All Implemented Interfaces:
Adaptable
- Direct Known Subclasses:
Comments.CommentBlock,Comments.CommentBlocks,Comments.CommentLine,EditorConfig,Property,Section
- Enclosing interface:
Adaptable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.ec4j.core.model.Adaptable
Adaptable.DefaultAdaptable -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetAdapter(Class<T> type) Returns this adapted as an object of the giventypeornullif adapting to a giventypeis not possible.
-
Field Details
-
adapters
-
-
Constructor Details
-
DefaultAdaptable
-
-
Method Details
-
getAdapter
Description copied from interface:AdaptableReturns this adapted as an object of the giventypeornullif adapting to a giventypeis not possible.Can be used to give callers an access to some underlying representation of this, such as
Pathfor aPath-based implementation ofEc4jPath.The set of supported types is implementation specific.
- Specified by:
getAdapterin interfaceAdaptable- Type Parameters:
T- the type to get an adapter for- Parameters:
type- the type of the adapter to lookup- Returns:
- the adapter of the given type or
nullif an adapter for the given type is not available
-