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
    Modifier and Type
    Interface
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    getAdapter(Class<T> type)
    Returns this adapted as an object of the given type or null if adapting to a given type is not possible.
  • Method Details

    • getAdapter

      <T> T getAdapter(Class<T> type)
      Returns this adapted as an object of the given type or null if adapting to a given type is not possible.

      Can be used to give callers an access to some underlying representation of this, such as Path for a Path-based implementation of Ec4jPath.

      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 null if an adapter for the given type is not available