in chill-scala/src/main/scala/com/twitter/chill/KryoBase.scala [101:112]
def isSingleton(klass: Class[_]): Boolean =
klass.getName.last == '$' && objSer.accepts(klass)
// Get the strategy if it is not null
def tryStrategy(cls: Class[_]): InstantiatorStrategy =
strategy.getOrElse {
val name = cls.getName
if (cls.isMemberClass() && !Modifier.isStatic(cls.getModifiers()))
throw new KryoException("Class cannot be created (non-static member class): " + name);
else
throw new KryoException("Class cannot be created (missing no-arg constructor): " + name);
}