Method: getType()

1: /*******************************************************************************
2: * Copyright (c) 2015 Obeo.
3: * All rights reserved. This program and the accompanying materials
4: * are made available under the terms of the Eclipse Public License v1.0
5: * which accompanies this distribution, and is available at
6: * http://www.eclipse.org/legal/epl-v10.html
7: *
8: * Contributors:
9: * Obeo - initial API and implementation
10: *******************************************************************************/
11: package org.eclipse.acceleo.query.validation.type;
12:
13: import java.util.Set;
14:
15: import org.eclipse.acceleo.query.runtime.IReadOnlyQueryEnvironment;
16:
17: /**
18: * Set validation type.
19: *
20: * @author <a href="mailto:yvan.lussaud@obeo.fr">Yvan Lussaud</a>
21: */
22: public class SetType extends AbstractCollectionType {
23:
24:         /**
25:          * Constructor.
26:          *
27:          * @param queryEnvironment
28:          * the {@link IReadOnlyQueryEnvironment}
29:          * @param type
30:          * the {@link IType}
31:          */
32:         public SetType(IReadOnlyQueryEnvironment queryEnvironment, IType type) {
33:                 super(queryEnvironment, type);
34:         }
35:
36:         /**
37:          * {@inheritDoc}
38:          *
39:          * @see org.eclipse.acceleo.query.validation.type.IType#getType()
40:          */
41:         @Override
42:         public Class<?> getType() {
43:                 return Set.class;
44:         }
45:
46:         /**
47:          * {@inheritDoc}
48:          *
49:          * @see java.lang.Object#toString()
50:          */
51:         @Override
52:         public String toString() {
53:                 return "Set(" + getCollectionType().toString() + ")";
54:         }
55:
56: }