001: /*
002: JSmooth: a VM wrapper toolkit for Windows
003: Copyright (C) 2003 Rodrigo Reyes <reyes@charabia.net>
004:
005: This program is free software; you can redistribute it and/or modify
006: it under the terms of the GNU General Public License as published by
007: the Free Software Foundation; either version 2 of the License, or
008: (at your option) any later version.
009:
010: This program is distributed in the hope that it will be useful,
011: but WITHOUT ANY WARRANTY; without even the implied warranty of
012: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013: GNU General Public License for more details.
014:
015: You should have received a copy of the GNU General Public License
016: along with this program; if not, write to the Free Software
017: Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
018:
019: */
020:
021: /*
022: * SkeletonBean.java
023: *
024: * Created on 7 août 2003, 20:09
025: */
026:
027: package net.charabia.jsmoothgen.skeleton;
028:
029: public class SkeletonBean {
030: private String m_executableName;
031: private String m_shortName;
032: private String m_description;
033: private String m_resourceCategory;
034: private int m_resourceJarId;
035: private int m_resourcePropsId;
036: private SkeletonProperty[] m_skelproperties;
037: private boolean m_debug = false;
038:
039: /** Creates a new instance of SkeletonBean */
040: public SkeletonBean() {
041: }
042:
043: public SkeletonBean(SkeletonBean sb) {
044: m_executableName = sb.m_executableName;
045: m_shortName = sb.m_shortName;
046: m_description = sb.m_description;
047: m_resourceCategory = sb.m_resourceCategory;
048: m_resourceJarId = sb.m_resourceJarId;
049: m_resourcePropsId = sb.m_resourcePropsId;
050: m_skelproperties = new SkeletonProperty[sb.m_skelproperties.length];
051: for (int i = 0; i < m_skelproperties.length; i++) {
052: m_skelproperties[i] = new SkeletonProperty(
053: sb.m_skelproperties[i]);
054: }
055: m_debug = sb.m_debug;
056: }
057:
058: public boolean equals(Object obj) {
059: if (obj instanceof SkeletonBean) {
060: return ((SkeletonBean) obj).m_shortName.equals(m_shortName);
061: }
062: return false;
063: }
064:
065: public int hashCode() {
066: return m_shortName.hashCode();
067: }
068:
069: public void setExecutableName(String name) {
070: m_executableName = name;
071: }
072:
073: public String getExecutableName() {
074: return m_executableName;
075: }
076:
077: public void setShortName(String name) {
078: m_shortName = name;
079: }
080:
081: public String getShortName() {
082: return m_shortName;
083: }
084:
085: public void setDescription(String desc) {
086: m_description = desc;
087: }
088:
089: public String getDescription() {
090: return m_description;
091: }
092:
093: public void setResourceCategory(String cat) {
094: m_resourceCategory = cat;
095: }
096:
097: public String getResourceCategory() {
098: return m_resourceCategory;
099: }
100:
101: public void setResourceJarId(int id) {
102: m_resourceJarId = id;
103: }
104:
105: public int getResourceJarId() {
106: return m_resourceJarId;
107: }
108:
109: public void setResourcePropsId(int id) {
110: m_resourcePropsId = id;
111: }
112:
113: public int getResourcePropsId() {
114: return m_resourcePropsId;
115: }
116:
117: public void setSkeletonProperties(SkeletonProperty[] props) {
118: m_skelproperties = props;
119: }
120:
121: public SkeletonProperty[] getSkeletonProperties() {
122: return m_skelproperties;
123: }
124:
125: public String toString() {
126: return m_shortName;
127: }
128:
129: public void setDebug(boolean isForDebugging) {
130: m_debug = isForDebugging;
131: }
132:
133: public boolean isDebug() {
134: return m_debug;
135: }
136:
137: }
|