protected Class<?> findSerializationType(Annotated a, boolean useStaticTyping) { // [JACKSON-120]: Check to see if serialization type is fixed Class<?> serializationType = _annotationIntrospector.findSerializationType(a); if (serializationType != null) { // Must be a super type... Class<?> type = a.getType(); if (!serializationType.isAssignableFrom(type)) { throw new IllegalArgumentException("Illegal concrete-type annotation for method '"+a.getName()+"': class "+serializationType.getName()+" not a super-type of (declared) class "+type.getName()); } return serializationType; } /* [JACKSON-114]: if using static typing, declared type is known * to be the type... */ JsonSerialize.Typing typing = _annotationIntrospector.findSerializationTyping(a); if (typing != null) { useStaticTyping = (typing == JsonSerialize.Typing.STATIC); } if (useStaticTyping) { return a.getType(); } return null; }