[New] Added StrolchComponent.hasComponent()
This commit is contained in:
parent
9f4082ebf0
commit
6b7f118969
|
@ -36,6 +36,14 @@ public interface ComponentContainer {
|
||||||
|
|
||||||
ComponentState getState();
|
ComponentState getState();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the given component is registered on this container
|
||||||
|
*
|
||||||
|
* @param clazz
|
||||||
|
* the type of component to check for
|
||||||
|
*
|
||||||
|
* @return true if the component is available
|
||||||
|
*/
|
||||||
boolean hasComponent(Class<?> clazz);
|
boolean hasComponent(Class<?> clazz);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -273,6 +273,18 @@ public class StrolchComponent {
|
||||||
return this.container.getComponent(clazz);
|
return this.container.getComponent(clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the given component is registered on the {@link ComponentContainer}
|
||||||
|
*
|
||||||
|
* @param clazz
|
||||||
|
* the type of component to check for
|
||||||
|
*
|
||||||
|
* @return true if the component is available
|
||||||
|
*/
|
||||||
|
public boolean hasComponent(Class<?> clazz) {
|
||||||
|
return this.container.hasComponent(clazz);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs the given {@link PrivilegedRunnable} as the given system user
|
* Performs the given {@link PrivilegedRunnable} as the given system user
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue