forked from JavaTX/JavaCompilerCore
Anderen Logger angefügt
This commit is contained in:
parent
1cb66d4f88
commit
4401414b67
29
src/de/dhbwstuttgart/logger/LoggerConfiguration.java
Normal file
29
src/de/dhbwstuttgart/logger/LoggerConfiguration.java
Normal file
@ -0,0 +1,29 @@
|
||||
package de.dhbwstuttgart.logger;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.HashMap;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.exceptions.DebugException;
|
||||
|
||||
public class LoggerConfiguration{
|
||||
|
||||
private final HashMap<Section,PrintStream> outputs = new HashMap<>(Section.values().length);
|
||||
|
||||
public LoggerConfiguration setOutput(Section forSection, PrintStream output){
|
||||
if(outputs.containsKey(forSection)){
|
||||
throw new DebugException("Eine outputStream für Section "+forSection+" ist bereits vorhanden");
|
||||
}
|
||||
outputs.put(forSection, output);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void forEach(ConfigurationEvaluater action){
|
||||
for(Section key : outputs.keySet()){
|
||||
action.apply(key, outputs.get(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ConfigurationEvaluater {
|
||||
public void apply(Section s, PrintStream o);
|
||||
}
|
26
src/de/dhbwstuttgart/logger/SectionLogger.java
Normal file
26
src/de/dhbwstuttgart/logger/SectionLogger.java
Normal file
@ -0,0 +1,26 @@
|
||||
package de.dhbwstuttgart.logger;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* Sämtliche Logging Ausgaben werden in die bei der Erstellung des Loggers übergebene Section eingeteilt
|
||||
* @author janulrich
|
||||
*
|
||||
*/
|
||||
public class SectionLogger {
|
||||
private Logger log;
|
||||
private Section section;
|
||||
protected SectionLogger(Logger logger, Section s){
|
||||
this.log = logger;
|
||||
this.section = s;
|
||||
}
|
||||
public void debug(String message){
|
||||
log.debug(message, section);
|
||||
}
|
||||
public void info(String string) {
|
||||
log.info(string, section);
|
||||
}
|
||||
public void error(String string) {
|
||||
log.error(string, section);
|
||||
}
|
||||
}
|
44
src/de/dhbwstuttgart/typeinference/unify/ParallelUnify.java
Normal file
44
src/de/dhbwstuttgart/typeinference/unify/ParallelUnify.java
Normal file
@ -0,0 +1,44 @@
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
import java.util.Vector;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.ConstraintsSet;
|
||||
import de.dhbwstuttgart.typeinference.Pair;
|
||||
|
||||
public class ParallelUnify {
|
||||
|
||||
public ParallelUnify(ConstraintsSet constraints){
|
||||
constraints.getConstraints();
|
||||
}
|
||||
|
||||
private CartesianProduct parallelCartProd(){
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private UnifyResult parallelUnify(Vector<Pair> pairs, FC_TTO fc){
|
||||
UnifyResult ret = new UnifyResult();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public UnifyResult unify(){
|
||||
UnifyResult ret = new UnifyResult();
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ParallelConstraintSet extends ConstraintsSet{
|
||||
Stream parallelGetConstraints(){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class UnifyResult{
|
||||
|
||||
}
|
||||
|
||||
class CartesianProduct{
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user