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

public abstract static class Adaptable.DefaultAdaptable extends Object implements Adaptable
  • Field Details

  • Constructor Details

    • DefaultAdaptable

      DefaultAdaptable(List<Object> adapters)
  • Method Details

    • getAdapter

      public <T> T getAdapter(Class<T> type)
      Description copied from interface: Adaptable
      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.

      Specified by:
      getAdapter in interface Adaptable
      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