Class AbstractTypeResolver

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractTypeResolver()
      Constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void addContainedType​(java.lang.String fqn, TypeDescriptor typeDescriptor)
      Mark a type descriptor as contained by the current scope.
      protected abstract void addRequiredType​(java.lang.String fqn, TypeDescriptor typeDescriptor)
      Mark a type descriptor as required by the current scope.
      <T extends ClassFileDescriptor>
      TypeCache.CachedType<T>
      create​(java.lang.String fullQualifiedName, com.buschmais.jqassistant.plugin.common.api.model.FileDescriptor fileDescriptor, java.lang.Class<T> descriptorType, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
      Resolve or create the descriptor for a Java type name.
      protected abstract TypeDescriptor findInArtifact​(java.lang.String fullQualifiedName, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
      Find a type descriptor in the current scope (e.g. the containing artifact).
      protected abstract TypeDescriptor findInDependencies​(java.lang.String fullQualifiedName, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
      Find a type descriptor outside the current scope (e.g. the known dependencies).
      protected abstract java.lang.String getContainedFileName​(java.lang.String requiredFileName)  
      protected abstract <T extends TypeDescriptor>
      void
      removeRequiredType​(java.lang.String fqn, T typeDescriptor)
      Mark a type descriptor as no longer required by the current scope.
      TypeCache.CachedType<TypeDescriptor> resolve​(java.lang.String fullQualifiedName, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
      Resolve or create the descriptor for Java type name to be used as dependency.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractTypeResolver

        protected AbstractTypeResolver()
        Constructor.
    • Method Detail

      • create

        public <T extends ClassFileDescriptor> TypeCache.CachedType<T> create​(java.lang.String fullQualifiedName,
                                                                              com.buschmais.jqassistant.plugin.common.api.model.FileDescriptor fileDescriptor,
                                                                              java.lang.Class<T> descriptorType,
                                                                              com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
        Description copied from interface: TypeResolver
        Resolve or create the descriptor for a Java type name.

        If a the descriptor already exists it will be used and migrated to the given type.

        Specified by:
        create in interface TypeResolver
        Type Parameters:
        T - The expected type of the descriptor.
        Parameters:
        fullQualifiedName - The fully qualified type name, e.g. "java.lang.Object".
        fileDescriptor - The file descriptor.
        descriptorType - The expected type of the descriptor.
        context - The scanner context. @return The type descriptor.
      • resolve

        public TypeCache.CachedType<TypeDescriptor> resolve​(java.lang.String fullQualifiedName,
                                                            com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
        Description copied from interface: TypeResolver
        Resolve or create the descriptor for Java type name to be used as dependency.
        Specified by:
        resolve in interface TypeResolver
        Parameters:
        fullQualifiedName - The fully qualified type name, e.g. "java.lang.Object".
        context - The scanner context.
      • getContainedFileName

        protected abstract java.lang.String getContainedFileName​(java.lang.String requiredFileName)
      • findInArtifact

        protected abstract TypeDescriptor findInArtifact​(java.lang.String fullQualifiedName,
                                                         com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
        Find a type descriptor in the current scope (e.g. the containing artifact).
        Parameters:
        fullQualifiedName - The name.
        context - The scanner context.
        Returns:
        The type descriptor.
      • findInDependencies

        protected abstract TypeDescriptor findInDependencies​(java.lang.String fullQualifiedName,
                                                             com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
        Find a type descriptor outside the current scope (e.g. the known dependencies).
        Parameters:
        fullQualifiedName - The name.
        context - The scanner context.
        Returns:
        The type descriptor.
      • addRequiredType

        protected abstract void addRequiredType​(java.lang.String fqn,
                                                TypeDescriptor typeDescriptor)
        Mark a type descriptor as required by the current scope.
        Parameters:
        fqn - The name.
        typeDescriptor - The descriptor.
      • addContainedType

        protected abstract void addContainedType​(java.lang.String fqn,
                                                 TypeDescriptor typeDescriptor)
        Mark a type descriptor as contained by the current scope.
        Parameters:
        fqn - The name.
        typeDescriptor - The descriptor.
      • removeRequiredType

        protected abstract <T extends TypeDescriptor> void removeRequiredType​(java.lang.String fqn,
                                                                              T typeDescriptor)
        Mark a type descriptor as no longer required by the current scope.
        Parameters:
        fqn - The name.
        typeDescriptor - The descriptor.