/*
* Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nuxeo - initial API and implementation
*
* $Id$
*/
package org.eclipse.ecr.core.schema.types;
import org.eclipse.ecr.core.schema.SchemaNames;
/**
* @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a>
*
*/
public final class AnyType extends AbstractType {
public static final String ID = "any";
public static final AnyType INSTANCE = new AnyType();
private static final long serialVersionUID = 8341470958787837560L;
private AnyType() {
super(null, SchemaNames.BUILTIN, ID);
}
@Override
public Type getSuperType() {
return null;
}
@Override
public Type[] getTypeHierarchy() {
return EMPTY_SUPERTYPES;
}
@Override
public boolean isAnyType() {
return true;
}
@Override
public boolean validate(Object object) {
return true;
}
@Override
public Object convert(Object object) {
return object;
}
protected Object readResolve() {
return INSTANCE;
}
}