public boolean hasService ( Class serviceClass ) { if ( serviceClass == null ) { throw new NullPointerException ( ) ; } boolean has ; synchronized ( services ) { has = services . containsKey ( serviceClass ) ; } if ( ! has && getBeanContext ( ) instanceof BeanContextServices ) { has = ( ( BeanContextServices ) getBeanContext ( ) ) . hasService ( serviceClass ) ; } return has ; }
Checks whether a service is registed in this context or the parent context .