![JAR search and dependency download from the Maven repository](/logo.png)
com.github.sisyphsu.smartbuf.converter.TranConverterMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smartbuf Show documentation
Show all versions of smartbuf Show documentation
SmartBuf, is a cross-language serialization and deserialization framework, and it has
high performance and compression ratio like protobuf, high compatibility and scalability like json.
The newest version!
package com.github.sisyphsu.smartbuf.converter;
import com.github.sisyphsu.smartbuf.reflect.XType;
/**
* Simple convert data from subclass to class
*
* @author sulin
* @since 2019-08-01 20:13:39
*/
public final class TranConverterMethod extends ConverterMethod {
public TranConverterMethod(Class> srcClass, Class> tgtClass) {
super(srcClass, tgtClass);
}
@Override
public Object convert(Object data, XType tgtType) {
return data;
}
@Override
public int getDistance() {
return 1 << 4;
}
@Override
public boolean isExtensible() {
return false;
}
@Override
public String toString() {
return String.format("[%s->%s]", getSrcClass().getName(), getTgtClass().getName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy