source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantCPInfo.java@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 1.8 KB
Line 
1/*
2 * Copyright 2000-2002,2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17package org.apache.tools.ant.taskdefs.optional.depend.constantpool;
18
19/**
20 * A Constant Pool entry which represents a constant value.
21 *
22 */
23public abstract class ConstantCPInfo extends ConstantPoolEntry {
24
25 /**
26 * The entry's untyped value. Each subclass interprets the constant
27 * value based on the subclass's type. The value here must be
28 * compatible.
29 */
30 private Object value;
31
32 /**
33 * Initialise the constant entry.
34 *
35 * @param tagValue the constant pool entry type to be used.
36 * @param entries the number of constant pool entry slots occupied by
37 * this entry.
38 */
39 protected ConstantCPInfo(int tagValue, int entries) {
40 super(tagValue, entries);
41 }
42
43 /**
44 * Get the value of the constant.
45 *
46 * @return the value of the constant (untyped).
47 */
48 public Object getValue() {
49 return value;
50 }
51
52 /**
53 * Set the constant value.
54 *
55 * @param newValue the new untyped value of this constant.
56 */
57 public void setValue(Object newValue) {
58 value = newValue;
59 }
60
61}
62
Note: See TracBrowser for help on using the repository browser.