Example usage for org.springframework.stereotype Component getClass

List of usage examples for org.springframework.stereotype Component getClass

Introduction

In this page you can find the example usage for org.springframework.stereotype Component getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.vaadin.spring.samples.mvp.ui.component.listener.TabSelectedListener.java

@Override
// this is kind of hacky!
// since all presenters are UI-scoped we need to call them into being before publishing events
// that can be received and handled by them
public void selectedTabChange(final SelectedTabChangeEvent event) {
    eventBus.publish(context.getBean(HeaderView.class), ControlsContext.empty());
    // TODO RAS enable
    com.vaadin.ui.Component c = event.getTabSheet().getSelectedTab();
    if (View.class.isAssignableFrom(c.getClass())) {
        View v = (View) c;
        SpringView springView = v.getClass().getAnnotation(SpringView.class);
        if (springView != null) {
            context.getBeansWithAnnotation(VaadinPresenter.class);
            eventBus.publish(this, new Screen(springView.name()));
        }//  ww w  .  jav a2 s.  co m
    }
}