001/* 002 * GeoAPI - Java interfaces for OGC/ISO standards 003 * Copyright © 2013-2023 Open Geospatial Consortium, Inc. 004 * http://www.geoapi.org 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); 007 * you may not use this file except in compliance with the License. 008 * You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.opengis.annotation; 019 020import java.lang.annotation.Target; 021import java.lang.annotation.Retention; 022import java.lang.annotation.Documented; 023import static java.lang.annotation.ElementType.*; 024import static java.lang.annotation.RetentionPolicy.*; 025 026 027/** 028 * An annotation specifying the stereotype (abstract, datatype, union, <i>etc.</i>) of an interface. 029 * The UML class diagrams in ISO/OGC specifications declare some members as abstract, meaning that 030 * instances of those interfaces are expected to implement one of their sub-interfaces. 031 * While there is nothing like "abstract interface" and "concrete interface" in the Java language, 032 * we nevertheless communicate ISO/OGC intent using this annotation. 033 * 034 * <p>Implementations are not required to represent "abstract interfaces" by Java abstract classes. 035 * This annotation is provided merely for informative purpose for testing tools, implementations 036 * based on Java reflection, or widgets among other usages.</p> 037 * 038 * <p>If this annotation is not present, then the default value is {@link Stereotype#TYPE}.</p> 039 * 040 * @author Martin Desruisseaux (Geomatys) 041 * @version 3.1 042 * @since 3.1 043 * 044 * @see <a href="http://en.wikipedia.org/wiki/Classifier_%28UML%29">Classifier on Wikipedia</a> 045 */ 046@Documented 047@Retention(RUNTIME) 048@Target(TYPE) 049public @interface Classifier { 050 /** 051 * Returns the type of modeling element (type, datatype, abstract or union). 052 * 053 * @return the type of modeling element as declared in the OGC/ISO UML diagram. 054 */ 055 Stereotype value(); 056}