protected boolean isSupported(TypeMirror type) {
if ((type instanceof Adaptable) && ((Adaptable) type).isAdapted()) {
return isSupported(((Adaptable) type).getAdapterType().getAdaptingType());
}
else if (type instanceof DeclaredType) {
DecoratedDeclaredType declaredType = (DecoratedDeclaredType) TypeMirrorDecorator.decorate(type);
if ((declaredType.getDeclaration() != null) && (isAMFTransient(declaredType.getDeclaration()))) {
return false;
}
else if ((declaredType.isInstanceOf(Collection.class.getName())) || (declaredType.isInstanceOf(java.util.Map.class.getName()))) {
boolean supported = true;
for (TypeMirror typeArgument : declaredType.getActualTypeArguments()) {
supported &= isSupported(typeArgument);
}
return supported;
}
else {
return declaredType.getDeclaration() != null && !unsupportedTypes.contains(declaredType.getDeclaration().getQualifiedName());
}
}
//by default, we're going to assume that the type is complex and is supported.
return true;