Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/*
 * Hewlett-Packard Company
 * All rights reserved.
 *
 * This file, its contents, concepts, methods, behavior, and operation
 * (collectively the "Software") are protected by trade secret, patent,
 * and copyright laws. The use of the Software is governed by a license
 * agreement. Disclosure of the Software to third parties, in any form,
 * in whole or in part, is expressly prohibited except as authorized by
 * the license agreement.
 */

import android.app.Activity;

public class Main {
    private static boolean checkIfActivityImplementsInterface(Activity theActivity, Class theInterface) {
        for (Class i : theActivity.getClass().getInterfaces())
            if (i.toString().equals(theInterface.toString()))
                return true;
        return false;
    }
}