1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package Torello.JDUInternal.Annotations.TypeAnnotations.Mirror;

import Torello.Java.StrCmpr;

import com.sun.source.tree.ClassTree;
import com.sun.source.tree.AnnotationTree;

// A Java Annotation-Mirror used as a 'data-class' to hold the actual values (during upgrade
// processing) that the user has actually assigned to an Annotation inside his or her 
// '.java' source-files.

public class TypeAnnotationMirrors
{
    // @StaticFunctional
    public final SFMirror sfMirror;

    // @JDHeaderBackgroundImg Data
    public final JDHBIMirror jdhbiMirror;

    // @CSSStyleSheets Data
    public final CSSLMirror csslMirror;


    public TypeAnnotationMirrors(ClassTree ct)
    {
        SFMirror    sfMirror    = null;
        JDHBIMirror jdhbiMirror = null;
        CSSLMirror  csslMirror  = null;

        for (AnnotationTree at : ct.getModifiers().getAnnotations())

            if (StrCmpr.equalsXOR(
                at.getAnnotationType().toString(),
                "StaticFunctional", "Torello.JavaDoc.StaticFunctional")
            )
                sfMirror = new SFMirror(at.getArguments());

            else if (StrCmpr.equalsXOR(
                at.getAnnotationType().toString(),
                "JDHeaderBackgroundImg", "Torello.JavaDoc.JDHeaderBackgroundImg")
            )
                jdhbiMirror = new JDHBIMirror(at.getArguments());

            else if (StrCmpr.equalsXOR(
                at.getAnnotationType().toString(),
                "CSSLinks", "Torello.JavaDoc.CSSLinks")
            )
                csslMirror = new CSSLMirror(at.getArguments());


        this.sfMirror       = sfMirror;
        this.jdhbiMirror    = jdhbiMirror;
        this.csslMirror     = csslMirror;
    }
}