public abstract class AbstractTypeResolver extends Object implements TypeResolver
Modifier | Constructor and Description |
---|---|
protected |
AbstractTypeResolver()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addContainedType(String fqn,
TypeDescriptor typeDescriptor)
Mark a type descriptor as contained by the current scope.
|
protected abstract void |
addRequiredType(String fqn,
TypeDescriptor typeDescriptor)
Mark a type descriptor as required by the current scope.
|
<T extends ClassFileDescriptor> |
create(String fullQualifiedName,
com.buschmais.jqassistant.plugin.common.api.model.FileDescriptor fileDescriptor,
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(String fullQualifiedName,
com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
Find a type descriptor in the current scope (e.g.
|
protected abstract TypeDescriptor |
findInDependencies(String fullQualifiedName,
com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
Find a type descriptor outside the current scope (e.g.
|
protected abstract String |
getContainedFileName(String requiredFileName) |
protected abstract <T extends TypeDescriptor> |
removeRequiredType(String fqn,
T typeDescriptor)
Mark a type descriptor as no longer required by the current scope.
|
TypeCache.CachedType<TypeDescriptor> |
resolve(String fullQualifiedName,
com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
Resolve or create the descriptor for Java type name to be used as
dependency.
|
public <T extends ClassFileDescriptor> TypeCache.CachedType<T> create(String fullQualifiedName, com.buschmais.jqassistant.plugin.common.api.model.FileDescriptor fileDescriptor, Class<T> descriptorType, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
TypeResolver
If a the descriptor already exists it will be used and migrated to the given type.
create
in interface TypeResolver
T
- The expected type of the descriptor.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.public TypeCache.CachedType<TypeDescriptor> resolve(String fullQualifiedName, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
TypeResolver
resolve
in interface TypeResolver
fullQualifiedName
- The fully qualified type name, e.g. "java.lang.Object".context
- The scanner context.protected abstract TypeDescriptor findInArtifact(String fullQualifiedName, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
fullQualifiedName
- The name.context
- The scanner context.protected abstract TypeDescriptor findInDependencies(String fullQualifiedName, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
fullQualifiedName
- The name.context
- The scanner context.protected abstract void addRequiredType(String fqn, TypeDescriptor typeDescriptor)
fqn
- The name.typeDescriptor
- The descriptor.protected abstract void addContainedType(String fqn, TypeDescriptor typeDescriptor)
fqn
- The name.typeDescriptor
- The descriptor.protected abstract <T extends TypeDescriptor> void removeRequiredType(String fqn, T typeDescriptor)
fqn
- The name.typeDescriptor
- The descriptor.Copyright © 2016 buschmais GbR. All rights reserved.