1 | /*
|
---|
2 | * Copyright 2003-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 | */
|
---|
17 |
|
---|
18 | package org.apache.tools.ant;
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Used to wrap types.
|
---|
22 | *
|
---|
23 | */
|
---|
24 | public interface TypeAdapter {
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * Sets the project
|
---|
28 | *
|
---|
29 | * @param p the project instance.
|
---|
30 | */
|
---|
31 | void setProject(Project p);
|
---|
32 |
|
---|
33 | /**
|
---|
34 | * Gets the project
|
---|
35 | *
|
---|
36 | * @return the project instance.
|
---|
37 | */
|
---|
38 | Project getProject();
|
---|
39 |
|
---|
40 | /**
|
---|
41 | * Sets the proxy object, whose methods are going to be
|
---|
42 | * invoked by ant.
|
---|
43 | * A proxy object is normally the object defined by
|
---|
44 | * a <typedef/> task that is adapted by the "adapter"
|
---|
45 | * attribute.
|
---|
46 | *
|
---|
47 | * @param o The target object. Must not be <code>null</code>.
|
---|
48 | */
|
---|
49 | void setProxy(Object o);
|
---|
50 |
|
---|
51 | /**
|
---|
52 | * Returns the proxy object.
|
---|
53 | *
|
---|
54 | * @return the target proxy object
|
---|
55 | */
|
---|
56 | Object getProxy();
|
---|
57 |
|
---|
58 | /**
|
---|
59 | * Check if the proxy class is compatible with this adapter - i.e.
|
---|
60 | * the adapter will be able to adapt instances of the give class.
|
---|
61 | *
|
---|
62 | * @param proxyClass the class to be checked.
|
---|
63 | */
|
---|
64 | void checkProxyClass(Class proxyClass);
|
---|
65 | }
|
---|