Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to fix issue #3111 by introducing a new Converter for BDIPlan
- Loading branch information
1 parent
6d60da6
commit 9b4f2d0
Showing
3 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
....gama.serialize/src/ummisco/gama/serializer/gamaType/converters/GamaBDIPlanConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package ummisco.gama.serializer.gamaType.converters; | ||
|
||
import com.thoughtworks.xstream.converters.Converter; | ||
import com.thoughtworks.xstream.converters.MarshallingContext; | ||
import com.thoughtworks.xstream.converters.UnmarshallingContext; | ||
import com.thoughtworks.xstream.io.HierarchicalStreamReader; | ||
import com.thoughtworks.xstream.io.HierarchicalStreamWriter; | ||
|
||
import msi.gaml.architecture.simplebdi.BDIPlan; | ||
import ummisco.gama.dev.utils.DEBUG; | ||
|
||
public class GamaBDIPlanConverter implements Converter { | ||
ConverterScope convertScope; | ||
|
||
public GamaBDIPlanConverter(final ConverterScope s) { | ||
convertScope = s; | ||
} | ||
|
||
@Override | ||
public boolean canConvert(final Class arg0) { | ||
return BDIPlan.class.isAssignableFrom(arg0); | ||
} | ||
|
||
@Override | ||
public void marshal(Object arg0, HierarchicalStreamWriter arg1, MarshallingContext arg2) { | ||
final BDIPlan plan = (BDIPlan) arg0; | ||
|
||
DEBUG.OUT("ConvertAnother : BDIPlan " + plan.getClass() + " " + plan.getGamlType().getContentType()); | ||
DEBUG.OUT("END --- ConvertAnother : BDIPlan "); | ||
} | ||
|
||
@Override | ||
public Object unmarshal(HierarchicalStreamReader arg0, UnmarshallingContext arg1) { | ||
return null; | ||
} | ||
} |