org.nakedobjects.nos.remote.command.java.JavaNullData Maven / Gradle / Ivy
package org.nakedobjects.nos.remote.command.java;
import java.io.Serializable;
import org.nakedobjects.noa.util.ByteDecoder;
import org.nakedobjects.noa.util.ByteEncoder;
import org.nakedobjects.noa.util.Encodable;
import org.nakedobjects.nof.core.util.ToString;
import org.nakedobjects.nof.reflect.remote.data.NullData;
public class JavaNullData implements NullData, Encodable, Serializable {
private static final long serialVersionUID = 1L;
private final String type;
public JavaNullData(final String type) {
this.type = type;
}
public JavaNullData(final ByteDecoder decoder) {
type = decoder.getString();
}
public void encode(final ByteEncoder encoder) {
encoder.add(type);
}
public String getType() {
return type;
}
public String toString() {
ToString str = new ToString(this);
str.append("type", type);
return str.toString();
}
}
// Copyright (c) Naked Objects Group Ltd.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy