in.workarounds.bundler.compiler.helper.SerializableHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bundler-compiler Show documentation
Show all versions of bundler-compiler Show documentation
Compiler for bundler library
The newest version!
package in.workarounds.bundler.compiler.helper;
import com.squareup.javapoet.TypeName;
import javax.lang.model.util.Elements;
/**
* Created by madki on 21/10/15.
*/
public class SerializableHelper extends TypeHelper {
public SerializableHelper(TypeName typeName, Elements elementUtils) {
super(typeName);
if (!TypeHelperFactory.isSerializable(typeName, elementUtils)) {
throw new IllegalStateException("SerializableHelper used for a non serializable object");
}
}
@Override
public String getBundleMethodSuffix() {
return "Serializable";
}
@Override
public boolean requiresCasting() {
return true;
}
}