Package org.ec4j.core.model
Interface Adaptable
- All Known Subinterfaces:
Ec4jPath
- All Known Implementing Classes:
Adaptable.DefaultAdaptable,Comments.CommentBlock,Comments.CommentBlocks,Comments.CommentLine,Ec4jPath.Ec4jPaths.NioPath,Ec4jPath.Ec4jPaths.StringPath,EditorConfig,Property,Section
public interface Adaptable
Allows extending some model class without having to bother with Java inheritance and generics.
-
Nested Class Summary
Nested Classes -
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.
-
Method Details
-
getAdapter
Returns 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.
- 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
-