1 19 package org.netbeans.modules.javacore.jmiimpl.javamodel; 20 21 import org.netbeans.jmi.javamodel.*; 22 import org.netbeans.lib.java.parser.ASTree; 23 import org.netbeans.mdr.storagemodel.StorableObject; 24 import org.netbeans.lib.java.parser.ASTreeTypes; 25 import org.netbeans.lib.java.parser.ParserTokens; 26 27 28 32 public abstract class StatementImpl extends TransientElement implements ParserTokens { 33 34 public StatementImpl(StorableObject o) { 35 super(o); 36 } 37 38 static Operator getOperator(int type) { 39 switch (type) { 40 case ASSIGN: 41 return OperatorEnum.ASSIGN; 42 case PLUS_ASSIGN: 43 return OperatorEnum.PLUSASSIGN; 44 case MINUS_ASSIGN: 45 return OperatorEnum.MINUSASSIGN; 46 case MULTI_ASSIGN: 47 return OperatorEnum.MULTIASSIGN; 48 case DIV_ASSIGN: 49 return OperatorEnum.DIVASSIGN; 50 case AND_ASSIGN: 51 return OperatorEnum.ANDASSIGN; 52 case OR_ASSIGN: 53 return OperatorEnum.ORASSIGN; 54 case XOR_ASSIGN: 55 return OperatorEnum.XORASSIGN; 56 case MOD_ASSIGN: 57 return OperatorEnum.MODASSIGN; 58 case L_SHIFT_ASSIGN: 59 return OperatorEnum.LSHIFTASSIGN; 60 case R_SHIFT_ASSIGN: 61 return OperatorEnum.RSHIFTASSIGN; 62 case UR_SHIFT_ASSIGN: 63 return OperatorEnum.URSHIFTASSIGN; 64 case MINUS: 65 return OperatorEnum.MINUS; 66 case PLUS: 67 return OperatorEnum.PLUS; 68 case MULTI: 69 return OperatorEnum.MULTI; 70 case AND: 71 return OperatorEnum.AND; 72 case DIV: 73 return OperatorEnum.DIV; 74 case COMP: 75 return OperatorEnum.COMP; 76 case DECREMENT: 77 return OperatorEnum.DEC; 78 case EQ: 79 return OperatorEnum.EQUAL; 80 case GT: 81 return OperatorEnum.GT; 82 case GTE: 83 return OperatorEnum.GTE; 84 case INCREMENT: 85 return OperatorEnum.INC; 86 case BOOL_AND: 87 return OperatorEnum.LAND; 88 case BOOL_OR: 89 return OperatorEnum.LOR; 90 case L_SHIFT: 91 return OperatorEnum.LSHIFT; 92 case LT: 93 return OperatorEnum.LT; 94 case LTE: 95 return OperatorEnum.LTE; 96 case MOD: 97 return OperatorEnum.MOD; 98 case NEQ: 99 return OperatorEnum.NEQUAL; 100 case NOT: 101 return OperatorEnum.NOT; 102 case OR: 103 return OperatorEnum.OR; 104 case R_SHIFT: 105 return OperatorEnum.RSHIFT; 106 case UR_SHIFT: 107 return OperatorEnum.URSHIFT; 108 case XOR: 109 return OperatorEnum.XOR; 110 case INSTANCEOF: 111 return OperatorEnum.INSTANCEOF; 112 default: 113 return null; 114 } 115 } 116 } 117 | Popular Tags |