001package Torello.JavaDoc; 002 003import java.lang.annotation.*; 004 005// @CSSLinks Annotation 006// 007// EXPORTS: 008// public String[] FileNames(); 009// 010// * Torello.JavaDoc.CSSLinks 011// This is the actual User-Annotation that is part of the Upgrader-API. A user may place the 012// @CSSLinks Annotation on a Type / CIET (Class, Interface, Enum, Annotation or 013// Rec) - And a CSS-File Link in the form of a <LINK REL=stylesheet TYPE=text/css HREF=...> 014// will be inserted for Class / Type / CIET that the user has annotated. 015// 016// * package Torello.JDUInternal.Features.USER_SUPPLIED_CSS_FILES 017// The classes in this package do the processing for inserting the '.css' Files which the user 018// has requested be placed into his Java-Doc '.html' Web-Page. These '.css' Files must be 019// located in the '../upgrade-files/stylesheets/' directory. These '.css' Files must either: 020// 021// 1) obey the standard naming convention and have the exact same file-name as the 022// Java-Class which has been annotated by the @CSSLinks Annotation 023// 024// 2) have a name equal to one of the names provided to the Annotation-Element "FileNames" 025// 026// * Torello.JDUInternal.Annotations.TypeAnnotations.Processor.CSSLinksProcessor 027// This is the Annotation-Processsor that is / can-be invoked by the 'javac' (Java-Compiler) at 028// Compile-Time. This Annotation-Processor does not do very much, but will check that the 029// names provided to the "FileNames" Annotation-Element are, indeed, valid Operating-System 030// File-Names - which exist and are accessible. 031// 032// * Torello.JDUInternal.Annotations.TypeAnnotations.Mirror.CSSLMirror 033// After the JDU Detects that a CIET / Type has had the @CSSLinks Annotation placed upon 034// it, this class extracts the relevant information out of the Annotation using the AST 035// Library in 'com.sun.source.tree' and all of it's helper classes. 036 037/** 038 * This Annotation allows a user to request that a CSS Link-Import be included in the Header 039 * Portion of any CIET/Type's respective Java-Doc Web-Page. This Annotation allows for multiple 040 * sheets to be applied to a single Java-Doc Page. 041 * 042 * <BR /><BR />The {@link #FileNames()} element in this annotation should be supplied with 043 * names for a file located inside the {@code ../upgrade-files/stylesheets/} sub-directory of 044 * whatever Java Source-Code Package in which your CIET/Type (your {@code '.java'} file) resides. 045 * When you specify a CSS-File in that directory, you need not include any actual directory string 046 * information in the file-name. Just the Simple-Name of the file itself is expected / sufficient. 047 * 048 * <BR /><BR />Importing CSS-Files from other locations on disk is also allowed. In such cases 049 * you would then (and only then) be obligated to include the Full-Path / Canonical File-Name 050 * for the CSS-File to be imported. 051 */ 052@Target(ElementType.TYPE) 053@Retention(RetentionPolicy.SOURCE) 054@JDHeaderBackgroundImg() 055 056public @interface CSSLinks 057{ 058 /** 059 * The CSS-StyleSheet file (or files) for which an HTML {@code <LINK REL=stylesheet>} Tag is to 060 * be inserted into this CIET/Type's Java-Doc Page Header. 061 * 062 * <BR /><BR />This Annotation-Element is a {@code String}-Array, which means more than one 063 * Style-Sheet may be included here. If the Style-Sheet has been properly placed, directly, 064 * into the {@code ../upgrade-files/stylesheets/} directory, then this {@code 'FileNames'} 065 * {@code String}-Array <I>should not include any parent or container directory information in 066 * the any of those kinds of FileName-{@code String's}</I>. 067 * 068 * <BR /><BR />If a StyleSheet whose location on disk is situated on the File-System in some 069 * unrelated place, then the file's Full-Path Name (or at least it's Relative-Path Name with 070 * respect to the Current Working Directory at Build Initiation Time) should be the 071 * {@code String} used within this Array-Element. 072 */ 073 public String[] FileNames(); 074}