001package ball.annotation; 002/*- 003 * ########################################################################## 004 * Utilities 005 * $Id: Manifest.java 5285 2020-02-05 04:23:21Z ball $ 006 * $HeadURL: svn+ssh://svn.hcf.dev/var/spool/scm/repository.svn/ball-util/trunk/src/main/java/ball/annotation/Manifest.java $ 007 * %% 008 * Copyright (C) 2008 - 2020 Allen D. Ball 009 * %% 010 * Licensed under the Apache License, Version 2.0 (the "License"); 011 * you may not use this file except in compliance with the License. 012 * You may obtain a copy of the License at 013 * 014 * http://www.apache.org/licenses/LICENSE-2.0 015 * 016 * Unless required by applicable law or agreed to in writing, software 017 * distributed under the License is distributed on an "AS IS" BASIS, 018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 019 * See the License for the specific language governing permissions and 020 * limitations under the License. 021 * ########################################################################## 022 */ 023import java.lang.annotation.Documented; 024import java.lang.annotation.Retention; 025import java.lang.annotation.Target; 026 027import static java.lang.annotation.ElementType.ANNOTATION_TYPE; 028import static java.lang.annotation.ElementType.PACKAGE; 029import static java.lang.annotation.ElementType.TYPE; 030import static java.lang.annotation.RetentionPolicy.RUNTIME; 031 032/** 033 * {@link java.lang.annotation.Annotation}s to generate a JAR 034 * {@link java.util.jar.Manifest META-INF/MANIFEST.MF}. 035 * 036 * @see ball.annotation.processing.ManifestProcessor 037 * 038 * @author {@link.uri mailto:ball@hcf.dev Allen D. Ball} 039 * @version $Revision: 5285 $ 040 */ 041public abstract class Manifest { 042 private Manifest() { } 043 044 /** 045 * Attribute name 046 */ 047 @Documented 048 @Retention(RUNTIME) 049 @Target({ ANNOTATION_TYPE }) 050 public @interface Attribute { 051 String value(); 052 } 053 054 /** 055 * Main-Class 056 */ 057 @Documented 058 @Retention(RUNTIME) 059 @Target({ TYPE }) 060 @Attribute("Main-Class") 061 public @interface MainClass { 062 } 063 064 /** 065 * {@link Package} section 066 */ 067 @Documented 068 @Retention(RUNTIME) 069 @Target({ PACKAGE }) 070 public @interface Section { 071 boolean sealed() default true; 072 } 073 074 /** 075 * Java-Bean 076 */ 077 @Documented 078 @Retention(RUNTIME) 079 @Target({ TYPE }) 080 @Attribute("Java-Bean") 081 public @interface JavaBean { 082 } 083 084 /** 085 * Depends-On 086 */ 087 @Documented 088 @Retention(RUNTIME) 089 @Target({ TYPE }) 090 @Attribute("Depends-On") 091 public @interface DependsOn { 092 String[] value(); 093 } 094 095 /** 096 * Design-Time-Only 097 */ 098 @Documented 099 @Retention(RUNTIME) 100 @Target({ TYPE }) 101 @Attribute("Design-Time-Only") 102 public @interface DesignTimeOnly { 103 String[] value(); 104 } 105}