KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > tools > jbicommon > descriptor > PetalsExtension


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005-2006 EBM WebSourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id$
20  * -------------------------------------------------------------------------
21  */

22
23 package org.objectweb.petals.tools.jbicommon.descriptor;
24
25 import java.net.URI JavaDoc;
26
27 import org.apache.commons.lang.builder.EqualsBuilder;
28 import org.apache.commons.lang.builder.HashCodeBuilder;
29 import org.apache.commons.lang.builder.ToStringBuilder;
30
31 /**
32  *
33  * @author ofabre
34  *
35  */

36 public class PetalsExtension {
37
38     private URI JavaDoc extensionURI;
39
40     private Object JavaDoc extensionObject;
41
42     public PetalsExtension() { // NOPMD by gblondelle
43
super();
44     }
45
46     @Override JavaDoc
47     public boolean equals(final Object JavaDoc other) {
48         if (!(other instanceof PetalsExtension)) {
49             return false; // NOPMD by gblondelle
50
}
51         PetalsExtension castOther = (PetalsExtension) other;
52         return new EqualsBuilder().append(extensionURI, castOther.extensionURI)
53                 .append(extensionObject, castOther.extensionObject).isEquals();
54     }
55
56     public Object JavaDoc getExtensionObject() {
57         return extensionObject;
58     }
59
60     public URI JavaDoc getExtensionURI() {
61         return extensionURI;
62     }
63
64     @Override JavaDoc
65     public int hashCode() {
66         return new HashCodeBuilder().append(extensionURI).append(
67                 extensionObject).toHashCode();
68     }
69
70     public void setExtensionObject(final Object JavaDoc extensionObject) {
71         this.extensionObject = extensionObject;
72     }
73
74     public void setExtensionURI(final URI JavaDoc extensionURI) {
75         this.extensionURI = extensionURI;
76     }
77
78     @Override JavaDoc
79     public String JavaDoc toString() {
80         return new ToStringBuilder(this).append("extensionURI", extensionURI)
81                 .append("extensionObject", extensionObject).toString();
82     }
83
84 }
85
Popular Tags