Skip to main content
summaryrefslogtreecommitdiffstats
blob: 90c515e555f507e1257adaec925854857f8fa62e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*******************************************************************************
 * Copyright (c) 2005-2009 itemis AG (http://www.itemis.eu) 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
 *
 *******************************************************************************/
package org.eclipse.xtend.typesystem.emf;

import java.util.Collections;
import java.util.Set;

import org.eclipse.emf.ecore.EDataType;
import org.eclipse.xtend.typesystem.AbstractTypeImpl;
import org.eclipse.xtend.typesystem.Feature;
import org.eclipse.xtend.typesystem.Type;

public class EDataTypeType extends AbstractTypeImpl {

    private EDataType dataType;

    public EDataTypeType(final EmfRegistryMetaModel model, final String fullyQualifiedName, final EDataType datatype) {
        super(model.getTypeSystem(), fullyQualifiedName);
        dataType = datatype;
    }

    @Override
    public Feature[] getContributedFeatures() {
        return new Feature[0];
    }

    public boolean isInstance(final Object o) {
        return dataType.isInstance(o);
    }

    public Object newInstance() {
        throw new UnsupportedOperationException();
    }

    @Override
    public Set<Type> getSuperTypes() {
        return Collections.<Type>emptySet();
    }

}

Back to the top