Example usage for android.app Service getClass

List of usage examples for android.app Service getClass

Introduction

In this page you can find the example usage for android.app Service getClass.

Prototype

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

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:com.nick.scalpel.Scalpel.java

public void wire(Service service, Scope scope) {
    if (isInScope(scope, Scope.Class))
        wireClz(service);//from w  w w.j a va2  s  .  c o  m
    if (isInScope(scope, Scope.Field)) {
        Class clz = service.getClass();
        for (Field field : clz.getDeclaredFields()) {
            for (FieldWirer wirer : mFieldWirers) {
                if (field.isAnnotationPresent(wirer.annotationClass())) {
                    wirer.wire(service, field);
                }
            }
        }
    }
}