001package Torello.JavaDoc; 002 003import java.lang.annotation.*; 004 005// @CSSLinks Annotation 006// 007// EXPORTS: 008// public String[] FileNames(); 009// public String[] FullPathFileNames(); 010// 011// * Torello.JavaDoc.JavaScriptImport 012// This is the actual User-Annotation that is part of the Upgrader-API. A user may place the 013// @CSSLinks Annotation on a Type / CIET (Class, Interface, Enum, Annotation or 014// Rec) - And a CSS-File Link in the form of a <LINK REL=stylesheet TYPE=text/css HREF=...> 015// will be inserted for Class / Type / CIET that the user has annotated. 016// 017// * package Torello.JDUInternal.Features.USER_SUPPLIED_JAVASCRIPT 018// The classes in this package do the processing for inserting the '.js' Files which the user 019// has requested be placed into his Java-Doc '.html' Web-Page. These '.js' Files must be 020// located in the '../upgrade-files/script/' directory. These '.css' Files must either: 021// 022// 1) obey the standard naming convention and have the exact same file-name as the 023// Java-Class which has been annotated by the @CSSLinks Annotation 024// 025// 2) have a name equal to one of the names provided to the Annotation-Element "FileNames" 026// 027// * Torello.JDUInternal.Annotations.TypeAnnotations.Processor.JSImportProcessor 028// This is the Annotation-Processsor that is / can-be invoked by the 'javac' (Java-Compiler) at 029// Compile-Time. This Annotation-Processor does not do very much, but will check that the 030// names provided to the "FileNames" Annotation-Element are, indeed, valid Operating-System 031// File-Names - which exist and are accessible. 032// 033// * Torello.JDUInternal.Annotations.TypeAnnotations.Mirror.JSImportMirror 034// After the JDU Detects that a CIET / Type has had the @JavaScriptImport Annotation placed upon 035// it, this class extracts the relevant information out of the Annotation using the AST 036// Library in 'com.sun.source.tree' and all of it's helper classes. 037 038@Target(ElementType.TYPE) 039@Retention(RetentionPolicy.SOURCE) 040public @interface JavaScriptImport 041{ 042 /** 043 * The File Names which should be passed via this {@code String[]}-Array must be relative to 044 * precisely one of your package's {@code '[src-dir]/upgrade-files/script/'} directories. Keep 045 * in mind that although Java's "Class Path" allows Source-Files for any given package to be 046 * distributed to multiple locations, {@code '.js'}-Files can only match precisely one 047 * {@code ../upgrade-files/script/*.js'} File on disk, or the the Annotation Processing system 048 * wil flag this annotation as an error. 049 */ 050 public String[] FileNames() default {}; 051 052 /** 053 * The File Names which are passed using this Element may refer to any {@code '.js'} File any 054 * where on the File-System. These Java-Script Files do not have to reside within the 055 * {@code ../upgrade-files/script/} directory. 056 */ 057 public String[] FullPathFileNames() default {}; 058}