public boolean isInstanceOf(String className) { if (getDeclaration() == null) { //special case: if we can't find the declaration, there's some compile error. return false; } else if (super.isInstanceOf(className)) { return true; } DecoratedClassType type = (DecoratedClassType) getSuperclass(); return (type != null) && (type.isInstanceOf(className)); }
/** * 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; }