MentaContainer

Compare Revisions

Ignore whitespace Rev 38 → Rev 39

/trunk/src/main/java/org/mentacontainer/impl/MentaComponent.java
18,8 → 18,6
*/
public class MentaComponent implements Component {
private final String name;
private final Class<? extends Object> klass;
private Map<String, Object> props = null;
34,18 → 32,16
private Object singletonValue = null;
 
public MentaComponent(String name, Class<? extends Object> klass, boolean singleton) {
public MentaComponent(Class<? extends Object> klass, boolean singleton) {
this.name = name;
 
this.klass = klass;
this.singleton = singleton;
}
public MentaComponent(String name, Class<? extends Object> klass) {
public MentaComponent(Class<? extends Object> klass) {
this(name, klass, false);
this(klass, false);
}
public boolean isSingleton() { return singleton; }
119,28 → 115,6
return array;
}
public String getName() {
return name;
}
public boolean equals(Object o) {
if (o instanceof MentaComponent) {
MentaComponent c = (MentaComponent) o;
return c.name.equals(this.name);
}
return false;
}
public int hashCode() {
return name.hashCode();
}
/*
* Use reflection to set a property in the bean
*/