101 * default value. 102 */ 103 protected SimpleTypeVisitor6(){ 104 DEFAULT_VALUE = null; 105 } 106 107 /** 108 * Constructor for concrete subclasses; uses the argument for the 109 * default value. 110 * 111 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} 112 */ 113 protected SimpleTypeVisitor6(R defaultValue){ 114 DEFAULT_VALUE = defaultValue; 115 } 116 117 /** 118 * The default action for visit methods. The implementation in 119 * this class just returns {@link #DEFAULT_VALUE}; subclasses will 120 * commonly override this method. 121 */ 122 protected R defaultAction(TypeMirror e, P p) { 123 return DEFAULT_VALUE; 124 } 125 126 /** 127 * {@inheritDoc} This implementation calls {@code defaultAction}. 128 * 129 * @param t {@inheritDoc} 130 * @param p {@inheritDoc} 131 * @return the result of {@code defaultAction} 132 */ 133 public R visitPrimitive(PrimitiveType t, P p) { 134 return defaultAction(t, p); 135 } 136 137 /** 138 * {@inheritDoc} This implementation calls {@code defaultAction}. 139 * 140 * @param t {@inheritDoc} | 101 * default value. 102 */ 103 protected SimpleTypeVisitor6(){ 104 DEFAULT_VALUE = null; 105 } 106 107 /** 108 * Constructor for concrete subclasses; uses the argument for the 109 * default value. 110 * 111 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} 112 */ 113 protected SimpleTypeVisitor6(R defaultValue){ 114 DEFAULT_VALUE = defaultValue; 115 } 116 117 /** 118 * The default action for visit methods. The implementation in 119 * this class just returns {@link #DEFAULT_VALUE}; subclasses will 120 * commonly override this method. 121 * 122 * @param e the type to process 123 * @param p a visitor-specified parameter 124 * @return {@code DEFAULT_VALUE} unless overridden 125 */ 126 protected R defaultAction(TypeMirror e, P p) { 127 return DEFAULT_VALUE; 128 } 129 130 /** 131 * {@inheritDoc} This implementation calls {@code defaultAction}. 132 * 133 * @param t {@inheritDoc} 134 * @param p {@inheritDoc} 135 * @return the result of {@code defaultAction} 136 */ 137 public R visitPrimitive(PrimitiveType t, P p) { 138 return defaultAction(t, p); 139 } 140 141 /** 142 * {@inheritDoc} This implementation calls {@code defaultAction}. 143 * 144 * @param t {@inheritDoc} |