KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > syndication > feed > CopyFrom


1 /*
2  * Copyright 2004 Sun Microsystems, Inc.
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 package com.sun.syndication.feed;
18
19 /**
20  * @author Alejandro Abdelnur
21  */

22 public interface CopyFrom {
23
24     /**
25      * Returns the interface the copyFrom works on.
26      * <p>
27      * This is useful when dealing with properties that may have multiple implementations.
28      * For example, Module.
29      * <p>
30      * @return the interface the copyFrom works on.
31      */

32     public Class JavaDoc getInterface();
33
34     /**
35      * Copies all the properties of the given bean into this one.
36      * <p>
37      * Any existing properties in this bean are lost.
38      * <p>
39      * This method is useful for moving from one implementation of a bean interface to another.
40      * For example from the default SyndFeed bean implementation to a Hibernate ready implementation.
41      * <p>
42      * @param obj the instance to copy properties from.
43      *
44      */

45     public void copyFrom(Object JavaDoc obj);
46
47 }
48
Popular Tags