public final void setInjected(boolean injected) {
        if (isInjected != injected) {
            this.isInjected = injected;
            
            if (isInjected()) {
                onInject();
            } else if (this instanceof Unloadable) {
                ((Unloadable) this).onUnload();
            }
        }        
    }