1/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Eclipse Public License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.eclipse.org/org/documents/epl-v10.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.ide.eclipse.adt.internal.build;
18
19import com.android.sdklib.build.ApkBuilder.JarStatus;
20
21/**
22 * Exception throw when native libraries are detected in jar file.
23 *
24 */
25public final class NativeLibInJarException extends Exception {
26    private static final long serialVersionUID = 1L;
27
28    private final JarStatus mStatus;
29    private final String mLibName;
30    private final String[] mConsoleMsgs;
31
32    NativeLibInJarException(JarStatus status, String message, String libName,
33            String[] consoleMsgs) {
34        super(message);
35        mStatus = status;
36        mLibName = libName;
37        mConsoleMsgs = consoleMsgs;
38    }
39
40    /**
41     * Returns the {@link JarStatus} object containing the information about the libraries that
42     * were found.
43     */
44    public JarStatus getStatus() {
45        return mStatus;
46    }
47
48    /**
49     * Returns the name of the jar file containing the native libraries.
50     */
51    public String getJarName() {
52        return mLibName;
53    }
54
55    /**
56     * Returns additional information that should be shown to the user.
57     */
58    public String[] getAdditionalInfo() {
59        return mConsoleMsgs;
60    }
61}
62