Class AbstractBaseContext

All Implemented Interfaces:
io.github.mmm.code.api.CodeContext, io.github.mmm.code.api.CodeLoader, io.github.mmm.code.api.CodeProvider, io.github.mmm.code.api.CodeWithContext, io.github.mmm.code.api.node.CodeNode, BaseContext, BaseProvider, BaseLoader, AutoCloseable
Direct Known Subclasses:
AbstractBaseContextWithCache, BaseContextChild

public abstract class AbstractBaseContext extends AbstractBaseProvider implements BaseContext
Base implementation of BaseContext.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Constructor Details

    • AbstractBaseContext

      public AbstractBaseContext(BaseSourceImpl source)
      The constructor.
      Parameters:
      source - the source.
  • Method Details

    • getParent

      public abstract AbstractBaseContext getParent()
      Specified by:
      getParent in interface BaseContext
      Specified by:
      getParent in interface io.github.mmm.code.api.CodeContext
      Specified by:
      getParent in interface io.github.mmm.code.api.node.CodeNode
    • getContext

      public BaseContext getContext()
      Specified by:
      getContext in interface BaseLoader
      Specified by:
      getContext in interface BaseProvider
      Specified by:
      getContext in interface io.github.mmm.code.api.CodeWithContext
    • getSource

      public BaseSource getSource()
      Specified by:
      getSource in interface BaseLoader
      Specified by:
      getSource in interface BaseProvider
      Specified by:
      getSource in interface io.github.mmm.code.api.CodeWithContext
    • getTypeFromCache

      protected BaseType getTypeFromCache(String qualifiedName)
      Parameters:
      qualifiedName - the qualified name of the requested CodeType.
      Returns:
      the requested CodeType from the cache or null if not in cache.
    • getSource

      public BaseSource getSource(String id)
      Specified by:
      getSource in interface BaseContext
      Parameters:
      id - the ID of the requested source.
      Returns:
      the existing BaseSource for the given ID or null if not found.
    • getLanguage

      public io.github.mmm.code.api.language.CodeLanguage getLanguage()
      Specified by:
      getLanguage in interface io.github.mmm.code.api.CodeContext
    • getFactory

      public BaseFactory getFactory()
      Specified by:
      getFactory in interface BaseContext
      Specified by:
      getFactory in interface io.github.mmm.code.api.CodeContext
    • getUnboundedWildcard

      public BaseTypeWildcard getUnboundedWildcard()
      Specified by:
      getUnboundedWildcard in interface BaseContext
      Specified by:
      getUnboundedWildcard in interface io.github.mmm.code.api.CodeContext
    • getRootType

      public BaseType getRootType()
      Specified by:
      getRootType in interface BaseContext
      Specified by:
      getRootType in interface io.github.mmm.code.api.CodeContext
    • getRootEnumerationType

      public BaseType getRootEnumerationType()
      Specified by:
      getRootEnumerationType in interface BaseContext
      Specified by:
      getRootEnumerationType in interface io.github.mmm.code.api.CodeContext
    • getVoidType

      public BaseType getVoidType()
      Specified by:
      getVoidType in interface BaseContext
      Specified by:
      getVoidType in interface io.github.mmm.code.api.CodeContext
    • getRootExceptionType

      public BaseType getRootExceptionType()
      Specified by:
      getRootExceptionType in interface BaseContext
      Specified by:
      getRootExceptionType in interface io.github.mmm.code.api.CodeContext
    • getBooleanType

      public BaseType getBooleanType(boolean primitive)
      Specified by:
      getBooleanType in interface BaseContext
      Specified by:
      getBooleanType in interface io.github.mmm.code.api.CodeContext
    • getNonPrimitiveType

      public BaseType getNonPrimitiveType(BaseType javaType)
      Specified by:
      getNonPrimitiveType in interface BaseContext
      Parameters:
      javaType - the BaseType that might be primitive.
      Returns:
      the corresponding non-primitive type.
    • getQualifiedNameForStandardType

      public String getQualifiedNameForStandardType(String simpleName, boolean omitStandardPackages)
      Specified by:
      getQualifiedNameForStandardType in interface io.github.mmm.code.api.CodeContext
    • createChildContext

      public BaseContext createChildContext()
      Specified by:
      createChildContext in interface BaseContext
      Specified by:
      createChildContext in interface io.github.mmm.code.api.CodeContext
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface io.github.mmm.code.api.CodeProvider