use of org.iobserve.model.correspondence.DataTypeEntry in project iobserve-analysis by research-iobserve.
the class ProbeMapper method computeAllocationComponentJavaSignature.
private String computeAllocationComponentJavaSignature(final AllocationContext allocation, final OperationSignature operationSignature) throws ControlEventCreationFailedException, InvocationException, DBException {
// there are only interfaces on model level -> therefore only public methods (no
// getModifiers available)
final String modifier = "public";
final DataType returnType = operationSignature.getReturnType__OperationSignature();
final List<DataTypeEntry> dataTypeEntries = this.correspondenceResource.collectAllObjectsByType(DataTypeEntry.class, CorrespondencePackage.Literals.DATA_TYPE_ENTRY);
final String codeLevelReturnType = this.getCodeLevelDataType(dataTypeEntries, returnType);
final String methodSignature = operationSignature.getEntityName();
// TODO parameters
final String parameterString = "*";
final AssemblyContext assemblyContext = this.assemblyResource.resolve(allocation.getAssemblyContext_AllocationContext());
final RepositoryComponent repositoryComponent = this.repositoryResource.resolve(assemblyContext.getEncapsulatedComponent__AssemblyContext());
final List<ComponentEntry> componentEntries = this.correspondenceResource.collectAllObjectsByType(ComponentEntry.class, CorrespondencePackage.Literals.COMPONENT_ENTRY);
final String codeLevelComponentIdentifier = this.getCodeLevelComponent(componentEntries, repositoryComponent);
final String completeMethodSignature = modifier + " " + codeLevelReturnType + " " + codeLevelComponentIdentifier + "." + methodSignature + "(" + parameterString + ")";
this.logger.debug("Constructed method string: {}", completeMethodSignature);
return completeMethodSignature;
}
Aggregations