use of com.buschmais.jqassistant.plugin.java.api.model.TypeDescriptor in project jqa-java-plugin by buschmais.
the class MethodSignatureVisitor method visitParameterType.
@Override
public SignatureVisitor visitParameterType() {
final ParameterDescriptor parameterDescriptor = visitorHelper.addParameterDescriptor(methodDescriptor, parameterIndex);
parameterIndex++;
return new AbstractTypeSignatureVisitor(containingType, visitorHelper) {
@Override
public SignatureVisitor visitArrayType() {
return dependentTypeSignatureVisitor;
}
@Override
public SignatureVisitor visitTypeArgument(char wildcard) {
return dependentTypeSignatureVisitor;
}
@Override
public void visitEnd(TypeDescriptor resolvedTypeDescriptor) {
parameterDescriptor.setType(resolvedTypeDescriptor);
}
};
}
use of com.buschmais.jqassistant.plugin.java.api.model.TypeDescriptor in project jqa-java-plugin by buschmais.
the class AbstractArtifactScopedTypeResolver method addToCache.
private void addToCache(List<FileDescriptor> fileDescriptors) {
for (FileDescriptor fileDescriptor : fileDescriptors) {
if (fileDescriptor instanceof TypeDescriptor) {
TypeDescriptor typeDescriptor = (TypeDescriptor) fileDescriptor;
artifactTypes.put(typeDescriptor.getFullQualifiedName(), typeDescriptor);
}
}
}
use of com.buschmais.jqassistant.plugin.java.api.model.TypeDescriptor in project jqa-java-plugin by buschmais.
the class AbstractTypeResolver method resolve.
@Override
public CachedType<TypeDescriptor> resolve(String fullQualifiedName, ScannerContext context) {
CachedType<TypeDescriptor> cachedType = typeCache.get(fullQualifiedName);
if (cachedType == null) {
TypeDescriptor typeDescriptor = findInArtifact(fullQualifiedName, context);
if (typeDescriptor == null) {
typeDescriptor = findInDependencies(fullQualifiedName, context);
}
if (typeDescriptor == null) {
String requiredFileName = "/" + fullQualifiedName.replace(".", "/") + ".class";
String containedFileName = getContainedFileName(requiredFileName);
typeDescriptor = context.peek(FileResolver.class).require(requiredFileName, containedFileName, ClassFileDescriptor.class, context);
setTypeProperties(typeDescriptor, fullQualifiedName);
addRequiredType(fullQualifiedName, typeDescriptor);
}
cachedType = getCachedType(fullQualifiedName, typeDescriptor);
}
return cachedType;
}
Aggregations