Coverage Report - com.sun.javafx.api.tree.JavaFXTree
 
Classes in this File Line Coverage Branch Coverage Complexity
JavaFXTree
N/A
N/A
0
JavaFXTree$JavaFXKind
0%
0/37
N/A
0
 
 1  
 /*
 2  
  * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
 3  
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 4  
  *
 5  
  * This code is free software; you can redistribute it and/or modify it
 6  
  * under the terms of the GNU General Public License version 2 only, as
 7  
  * published by the Free Software Foundation.  Sun designates this
 8  
  * particular file as subject to the "Classpath" exception as provided
 9  
  * by Sun in the LICENSE file that accompanied this code.
 10  
  *
 11  
  * This code is distributed in the hope that it will be useful, but WITHOUT
 12  
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13  
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14  
  * version 2 for more details (a copy is included in the LICENSE file that
 15  
  * accompanied this code).
 16  
  *
 17  
  * You should have received a copy of the GNU General Public License version
 18  
  * 2 along with this work; if not, write to the Free Software Foundation,
 19  
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20  
  *
 21  
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 22  
  * CA 95054 USA or visit www.sun.com if you need additional information or
 23  
  * have any questions.
 24  
  */
 25  
 
 26  
 package com.sun.javafx.api.tree;
 27  
 
 28  
 import com.sun.source.tree.Tree;
 29  
 import com.sun.source.tree.UnaryTree;
 30  
 
 31  
 /**
 32  
  * Common interface for all nodes in an abstract syntax tree for the 
 33  
  * JavaFX Script language.
 34  
  *
 35  
  * <p><b>WARNING:</b> This interface and its sub-interfaces are 
 36  
  * subject to change as the JavaFX Script programming language evolves.
 37  
  * These interfaces are implemented by Sun's JavaFX Script compiler (javafxc) 
 38  
  * and should not be implemented either directly or indirectly by 
 39  
  * other applications.
 40  
  *
 41  
  * @author Tom Ball
 42  
  */
 43  
 public interface JavaFXTree extends Tree {
 44  
                 
 45  
     /**
 46  
      * Enumerates all kinds of trees.
 47  
      */
 48  0
     public enum JavaFXKind {
 49  
 
 50  
         /**
 51  
          * Used for instances of {@link BindExpressionTree}.
 52  
          */
 53  0
         BIND_EXPRESSION(BindExpressionTree.class),
 54  
 
 55  
          /**
 56  
          * Used for instances of {@link BlockExpressionTree}.
 57  
          */
 58  0
         BLOCK_EXPRESSION(BlockExpressionTree.class),
 59  
 
 60  
         /**
 61  
          * Used for instances of {@link ClassDeclarationTree}.
 62  
          */
 63  0
         CLASS_DECLARATION(ClassDeclarationTree.class),
 64  
 
 65  
         /**
 66  
          * Used for instances of {@link ForExpressionTree}.
 67  
          */
 68  0
         FOR_EXPRESSION(ForExpressionTree.class),
 69  
 
 70  
         /**
 71  
          * Used for instances of {@link ForExpressionInClauseTree}.
 72  
          */
 73  0
         FOR_EXPRESSION_IN_CLAUSE(ForExpressionInClauseTree.class),
 74  
 
 75  
         /**
 76  
          * Used for instances of {@link InitDefinitionTree}.
 77  
          */
 78  0
         INIT_DEFINITION(InitDefinitionTree.class),
 79  
         
 80  
         /**
 81  
          * Used for instances of {@link InterpolateTree}.
 82  
          */
 83  0
         INTERPOLATE(InterpolateTree.class),
 84  
         
 85  
         /**
 86  
          * Used for instances of {@link InterpolateValueTree}.
 87  
          */
 88  0
         INTERPOLATE_VALUE(InterpolateValueTree.class), 
 89  
         
 90  
         /**
 91  
          * Used for instances of {@link KeyFrameLiteralTree}.
 92  
          */
 93  0
         KEYFRAME_LITERAL(KeyFrameLiteralTree.class),
 94  
 
 95  
         /**
 96  
          * Used for instances of {@link InitDefinitionTree}.
 97  
          */
 98  0
         POSTINIT_DEFINITION(InitDefinitionTree.class),
 99  
 
 100  
         /**
 101  
          * Used for instances of {@link InstantiateTree}.
 102  
          */
 103  0
         INSTANTIATE(InstantiateTree.class),
 104  
 
 105  
         /**
 106  
          * Used for instances of {@link ObjectLiteralPartTree}.
 107  
          */
 108  0
         OBJECT_LITERAL_PART(ObjectLiteralPartTree.class),
 109  
 
 110  
         /**
 111  
          * Used for instances of {@link TriggerTree}.
 112  
          */
 113  0
         TRIGGER_WRAPPER(TriggerTree.class),
 114  
 
 115  
 
 116  
         /**
 117  
          * Used for instances of {@link OnReplaceTree}.
 118  
          */
 119  0
         ON_REPLACE(OnReplaceTree.class),
 120  
 
 121  
        
 122  
         /**
 123  
          * Used for instances of {@link FunctionDefinitionTree}.
 124  
          */
 125  0
         FUNCTION_DEFINITION(FunctionDefinitionTree.class),
 126  
 
 127  
         /**
 128  
          * Used for instances of {@link FunctionValueTree}.
 129  
          */
 130  0
         FUNCTION_VALUE(FunctionValueTree.class),
 131  
 
 132  
         /**
 133  
          * Used for instances of {@link SequenceDeleteTree}.
 134  
          */
 135  0
         SEQUENCE_DELETE(SequenceDeleteTree.class),
 136  
 
 137  
         /**
 138  
          * Used for instances of {@link SequenceEmptyTree}.
 139  
          */
 140  0
         SEQUENCE_EMPTY(SequenceEmptyTree.class),
 141  
 
 142  
         /**
 143  
          * Used for instances of {@link SequenceExplicitTree}.
 144  
          */
 145  0
         SEQUENCE_EXPLICIT(SequenceExplicitTree.class),
 146  
 
 147  
         /**
 148  
          * Used for instances of {@link SequenceIndexedTree}.
 149  
          */
 150  0
         SEQUENCE_INDEXED(SequenceIndexedTree.class),
 151  
 
 152  
          /**
 153  
          * Used for instances of {@link SequenceSliceTree}.
 154  
          */
 155  0
         SEQUENCE_SLICE(SequenceSliceTree.class),
 156  
 
 157  
         /**
 158  
          * Used for instances of {@link SequenceInsertTree}.
 159  
          */
 160  0
         SEQUENCE_INSERT(SequenceInsertTree.class),
 161  
 
 162  
         /**
 163  
          * Used for instances of {@link SequenceRangeTree}.
 164  
          */
 165  0
         SEQUENCE_RANGE(SequenceRangeTree.class),
 166  
 
 167  
         /**
 168  
          * Used for instances of {@link SetAttributeToObjectTree}.
 169  
          */
 170  0
         SET_ATTRIBUTE_TO_OBJECT(SetAttributeToObjectTree.class),
 171  
 
 172  
         /**
 173  
          * Used for instances of {@link StringExpressionTree}.
 174  
          */
 175  0
         STRING_EXPRESSION(StringExpressionTree.class),
 176  
         
 177  
         /**
 178  
          * Used for instances of {@link TimeLiteralTree}.
 179  
          */
 180  0
         TIME_LITERAL(TimeLiteralTree.class),
 181  
 
 182  
         /**
 183  
          * Used for instances of {@link TypeAnyTree}.
 184  
          */
 185  0
         TYPE_ANY(TypeAnyTree.class),
 186  
 
 187  
         /**
 188  
          * Used for instances of {@link TypeClassTree}.
 189  
          */
 190  0
         TYPE_CLASS(TypeClassTree.class),
 191  
 
 192  
         /**
 193  
          * Used for instances of {@link TypeFunctionalTree}.
 194  
          */
 195  0
         TYPE_FUNCTIONAL(TypeFunctionalTree.class),
 196  
         
 197  
         /**
 198  
          * Used for sizeof unary operator.
 199  
          */
 200  0
         SIZEOF(UnaryTree.class),
 201  
         
 202  
         /**
 203  
          * Used for reverse unary operator.
 204  
          */
 205  0
         REVERSE(UnaryTree.class),
 206  
 
 207  
         /**
 208  
          * Used for instances of {@link TypeUnknownTree}.
 209  
          */
 210  0
         TYPE_UNKNOWN(TypeUnknownTree.class);
 211  
 
 212  0
         JavaFXKind(Class<? extends Tree> intf) {
 213  0
             associatedInterface = intf;
 214  0
         }
 215  
                 
 216  
         public Class<? extends Tree> asInterface() {
 217  0
             return associatedInterface;
 218  
         }
 219  
         
 220  
         private final Class<? extends Tree> associatedInterface;
 221  
     }
 222  
     
 223  
     /**
 224  
      * Gets the com.sun.source.tree.Tree.Kind of this tree.  Because
 225  
      * Tree kinds cannot be extended, Kind.OTHER is always returned for
 226  
      * any instance of JavaFXTree.  Use <code>getJavaFXKind</code> to
 227  
      * get the JavaFX kind.
 228  
      *
 229  
      * @return Kind.OTHER
 230  
      */
 231  
     Kind getKind();
 232  
     
 233  
     /**
 234  
      * Gets the JavaFX kind of this tree.
 235  
      *
 236  
      * @return the kind of this tree.
 237  
      */
 238  
     JavaFXKind getJavaFXKind();
 239  
     
 240  
     /**
 241  
      * Accept method used to implement the visitor pattern.  The
 242  
      * visitor pattern is used to implement operations on trees.
 243  
      *
 244  
      * @param <R> result type of this operation.
 245  
      * @param <D> type of additonal data.
 246  
      */
 247  
     <R,D> R accept(JavaFXTreeVisitor<R,D> visitor, D data);
 248  
 }