Example usage for java.util.logging Handler getClass

List of usage examples for java.util.logging Handler getClass

Introduction

In this page you can find the example usage for java.util.logging Handler getClass.

Prototype

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

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:uk.co.grahamcox.xml.XmlHandler.java

/**
 * Create the handler/*from  w w  w .jav  a2 s.c  om*/
 * @param handler The handler to delegate to
 */
public XmlHandler(Handler handler) {
    this.handler = handler;
    if (handler != null) {
        for (Method method : handler.getClass().getMethods()) {
            StartElement startElement = method.getAnnotation(StartElement.class);
            if (startElement != null) {
                LOG.debug("Found handler for start element: " + method);
                startElements.put(method, new Path(startElement.value()));
            }
            EndElement endElement = method.getAnnotation(EndElement.class);
            if (endElement != null) {
                LOG.debug("Found handler for end element: " + method);
                endElements.put(method, new Path(endElement.value()));
            }
            Characters characters = method.getAnnotation(Characters.class);
            if (characters != null) {
                LOG.debug("Found handler for characters: " + method);
                this.characters.put(method, new Path(characters.value()));
            }
        }
    }
}