Coverage Report - com.sun.tools.javafx.tree.JFXOnReplace
 
Classes in this File Line Coverage Branch Coverage Complexity
JFXOnReplace
77%
17/22
N/A
0
 
 1  
 /*
 2  
  * Copyright 2007 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  
 
 27  
 /**
 28  
  *
 29  
  * @author Robert Field
 30  
  * @author Zhiqun Chen
 31  
  */
 32  
 
 33  
 package com.sun.tools.javafx.tree;
 34  
 
 35  
 import com.sun.javafx.api.tree.JavaFXTree.JavaFXKind;
 36  
 import com.sun.javafx.api.tree.JavaFXTreeVisitor;
 37  
 import com.sun.javafx.api.tree.OnReplaceTree;
 38  
 
 39  0
 public class JFXOnReplace extends JFXStatement implements OnReplaceTree {
 40  
     
 41  
     private final JFXVar firstIndex;
 42  
     private final JFXVar oldValue;
 43  
     private final JCBlock body;
 44  
     private int endKind;
 45  
 
 46  
     private JFXVar lastIndex;
 47  
     private JFXVar newElements;
 48  
 
 49  
     
 50  
     public JFXOnReplace( JFXVar oldValue, JCBlock body) {
 51  0
         this(oldValue, null, null, 0, null, body);
 52  0
     }
 53  
     
 54  
     
 55  
     public JFXOnReplace(JFXVar oldValue, JFXVar firstIndex, JFXVar lastIndex,
 56  252
             int endKind, JFXVar newElements, JCBlock body) {
 57  252
         this.oldValue = oldValue;
 58  252
         this.firstIndex = firstIndex;
 59  252
         this.lastIndex = lastIndex;
 60  252
         this.endKind = endKind;
 61  252
         this.newElements = newElements;
 62  252
         this.body = body;   
 63  252
     }
 64  
     
 65  
     public void accept(JavafxVisitor v) {
 66  758
         v.visitOnReplace(this);
 67  758
     }
 68  
 
 69  
     
 70  
     public int getTag() {
 71  504
         return JavafxTag.ON_REPLACE;
 72  
     }
 73  
     
 74  
     public JFXVar getOldValue() {
 75  1039
         return oldValue;
 76  
     }
 77  
     
 78  
     public JCBlock getBody() {
 79  884
         return body;
 80  
     }
 81  
     
 82  
     public JFXVar getFirstIndex () {
 83  793
         return firstIndex;
 84  
     }
 85  
 
 86  
     public JFXVar getLastIndex () {
 87  793
         return lastIndex;
 88  
     }
 89  
 
 90  
     public JFXVar getNewElements () {
 91  1017
         return newElements;
 92  
     }
 93  
 
 94  
     public JavaFXKind getJavaFXKind() {
 95  0
         return JavaFXKind.ON_REPLACE;
 96  
     }
 97  
 
 98  
     public <R, D> R accept(JavaFXTreeVisitor<R, D> visitor, D data) {
 99  0
         return visitor.visitOnReplace(this, data);
 100  
     }
 101  
 
 102  
     public int getEndKind () {
 103  126
         return endKind;
 104  
     }
 105  
 }