Collection<TypeMirror> typeArgs = ((DecoratedDeclaredType) decorated).getActualTypeArguments(); if (typeArgs != null && typeArgs.size() == 1) { DecoratedTypeMirror componentType = (DecoratedTypeMirror) typeArgs.iterator().next();
/** * Whether the given type is supported. * * @param type The type to test for supportability. * @return Whether the given type is supported. */ 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) && (isGWTTransient(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 !unsupportedTypes.contains(declaredType.getDeclaration().getQualifiedName()); } } //by default, we're going to assume that the type is complex and is supported. return true; }
/** * Whether the given type is supported. * * @param type The type to test for supportability. * @return Whether the given type is supported. */ 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 !unsupportedTypes.contains(declaredType.getDeclaration().getQualifiedName()); } } //by default, we're going to assume that the type is complex and is supported. return true; }
/** * Whether the given type is supported. * * @param type The type to test for supportability. * @return Whether the given type is supported. */ 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) && (isGWTTransient(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 !unsupportedTypes.contains(declaredType.getDeclaration().getQualifiedName()); } } //by default, we're going to assume that the type is complex and is supported. return true; }
/** * Whether the given type is supported. * * @param type The type to test for supportability. * @return Whether the given type is supported. */ 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; }