01: package org.drools.spi;
02:
03: /*
04: * Copyright 2005 JBoss Inc
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: import java.io.Serializable;
20: import java.lang.reflect.Method;
21:
22: import org.drools.base.ValueType;
23: import org.drools.common.InternalWorkingMemory;
24:
25: public interface Extractor extends Serializable {
26:
27: public Object getValue(InternalWorkingMemory workingMemory,
28: Object object);
29:
30: public char getCharValue(InternalWorkingMemory workingMemory,
31: Object object);
32:
33: public int getIntValue(InternalWorkingMemory workingMemory,
34: Object object);
35:
36: public byte getByteValue(InternalWorkingMemory workingMemory,
37: Object object);
38:
39: public short getShortValue(InternalWorkingMemory workingMemory,
40: Object object);
41:
42: public long getLongValue(InternalWorkingMemory workingMemory,
43: Object object);
44:
45: public float getFloatValue(InternalWorkingMemory workingMemory,
46: Object object);
47:
48: public double getDoubleValue(InternalWorkingMemory workingMemory,
49: Object object);
50:
51: public boolean getBooleanValue(InternalWorkingMemory workingMemory,
52: Object object);
53:
54: public boolean isNullValue(InternalWorkingMemory workingMemory,
55: Object object);
56:
57: public boolean isGlobal();
58:
59: public ValueType getValueType();
60:
61: public Class getExtractToClass();
62:
63: public String getExtractToClassName();
64:
65: public Method getNativeReadMethod();
66:
67: public int getHashCode(InternalWorkingMemory workingMemory,
68: Object object);
69:
70: }
|