001/* 002 * ============================================================================ 003 * Copyright © 2002-2021 by Thomas Thrien. 004 * All Rights Reserved. 005 * ============================================================================ 006 * Licensed to the public under the agreements of the GNU Lesser General Public 007 * License, version 3.0 (the "License"). You may obtain a copy of the License at 008 * 009 * http://www.gnu.org/licenses/lgpl.html 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 013 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 014 * License for the specific language governing permissions and limitations 015 * under the License. 016 */ 017 018package org.tquadrat.foundation.config.ap; 019 020import static org.apiguardian.api.API.Status.INTERNAL; 021import static org.tquadrat.foundation.config.ap.ConfigAnnotationProcessor.LIST_ACCESSOR_TYPE; 022import static org.tquadrat.foundation.config.ap.ConfigAnnotationProcessor.MAP_ACCESSOR_TYPE; 023import static org.tquadrat.foundation.config.ap.ConfigAnnotationProcessor.SET_ACCESSOR_TYPE; 024 025import org.apiguardian.api.API; 026import org.tquadrat.foundation.annotation.ClassVersion; 027import org.tquadrat.foundation.javacomposer.TypeName; 028 029/** 030 * The kind of collection for a property type that is a collection. 031 * 032 * @version $Id: CollectionKind.java 1002 2022-02-01 21:33:00Z tquadrat $ 033 * @extauthor Thomas Thrien - thomas.thrien@tquadrat.org 034 * @UMLGraph.link 035 * @since 0.1.0 036 */ 037@ClassVersion( sourceVersion = "$Id: CollectionKind.java 1002 2022-02-01 21:33:00Z tquadrat $" ) 038@API( status = INTERNAL, since = "0.1.0" ) 039public enum CollectionKind 040{ 041 /*------------------*\ 042 ====** Enum Declaration **================================================= 043 \*------------------*/ 044 /** 045 * The type is a List. 046 */ 047 LIST( LIST_ACCESSOR_TYPE ), 048 049 /** 050 * The type is a Map. 051 */ 052 MAP( MAP_ACCESSOR_TYPE ), 053 054 /** 055 * The type is a Set. 056 */ 057 SET( SET_ACCESSOR_TYPE ), 058 059 /** 060 * The type is not a collection at all. 061 */ 062 NO_COLLECTION( null ); 063 064 /*------------*\ 065 ====** Attributes **======================================================= 066 \*------------*/ 067 /** 068 * The type name for the accessor. 069 */ 070 private final TypeName m_AccessorType; 071 072 /*--------------*\ 073 ====** Constructors **===================================================== 074 \*--------------*/ 075 /** 076 * Creates a new {@code CollectionKind} instance. 077 * 078 * @param accessor The type name for the accessor. 079 */ 080 private CollectionKind( final TypeName accessor ) 081 { 082 m_AccessorType = accessor; 083 } // CollectionKind() 084 085 /*---------*\ 086 ====** Methods **========================================================== 087 \*---------*/ 088 /** 089 * Returns the accessor type for the collection kind. 090 * 091 * @return The accessor type. 092 */ 093 public final TypeName getAccessorType() { return m_AccessorType; } 094} 095// enum CollectionKind 096 097/* 098 * End of File 099 */