Showing preview only (606K chars total). Download the full file or copy to clipboard to get everything.
Repository: google/android-classyshark
Branch: master
Commit: 78ddba71b0d8
Files: 172
Total size: 550.5 KB
Directory structure:
gitextract__6u5jl00/
├── .gitignore
├── CONTRIB.md
├── ClassySharkAndroid/
│ ├── .gitignore
│ ├── ClassySharkAndroid.iml
│ ├── app/
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── google/
│ │ │ └── classysharkandroid/
│ │ │ └── activities/
│ │ │ └── classysharkandroid/
│ │ │ └── ApplicationTest.java
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── assets/
│ │ │ │ ├── prettify.css
│ │ │ │ ├── prettify.js
│ │ │ │ ├── run_prettify.js
│ │ │ │ └── sons-of-obsidian.css
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── google/
│ │ │ │ └── classysharkandroid/
│ │ │ │ ├── activities/
│ │ │ │ │ ├── ClassesListActivity.java
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── SourceViewerActivity.java
│ │ │ │ ├── adapters/
│ │ │ │ │ └── StableArrayAdapter.java
│ │ │ │ ├── dex/
│ │ │ │ │ └── DexLoaderBuilder.java
│ │ │ │ ├── reflector/
│ │ │ │ │ ├── ClassTypeAlgorithm.java
│ │ │ │ │ ├── ClassesNamesList.java
│ │ │ │ │ └── Reflector.java
│ │ │ │ └── utils/
│ │ │ │ ├── IOUtils.java
│ │ │ │ └── UriUtils.java
│ │ │ └── res/
│ │ │ ├── layout/
│ │ │ │ ├── activity_classes_list.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── activity_source_viewer.xml
│ │ │ ├── menu/
│ │ │ │ ├── menu_main.xml
│ │ │ │ └── menu_source_viewer.xml
│ │ │ ├── values/
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── values-w820dp/
│ │ │ └── dimens.xml
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── classysharkandroid/
│ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── settings.gradle
│ └── snap/
│ └── snapcraft.yaml
├── ClassySharkWS/
│ ├── build.gradle
│ ├── gradlew
│ ├── gradlew.bat
│ └── src/
│ ├── META-INF/
│ │ └── MANIFEST.MF
│ └── com/
│ └── google/
│ └── classyshark/
│ ├── Main.java
│ ├── Shark.java
│ ├── Version.java
│ ├── analytics/
│ │ ├── Analytics.java
│ │ ├── FocusPoint.java
│ │ ├── GoogleAnalytics_v1_URLBuildingStrategy.java
│ │ ├── HTTPGetMethod.java
│ │ ├── JGoogleAnalyticsTracker.java
│ │ ├── LoggingAdapter.java
│ │ └── URLBuildingStrategy.java
│ ├── cli/
│ │ └── CliMode.java
│ ├── gui/
│ │ ├── GuiMode.java
│ │ ├── panel/
│ │ │ ├── ArchiveDisplayer.java
│ │ │ ├── ClassySharkPanel.java
│ │ │ ├── FileTransferHandler.java
│ │ │ ├── ViewerController.java
│ │ │ ├── chart/
│ │ │ │ ├── RingChart.java
│ │ │ │ └── RingChartPanel.java
│ │ │ ├── displayarea/
│ │ │ │ ├── BatchDocument.java
│ │ │ │ ├── DisplayArea.java
│ │ │ │ ├── IDisplayArea.java
│ │ │ │ └── doodles/
│ │ │ │ ├── ChristmasBG.java
│ │ │ │ ├── Doodle.java
│ │ │ │ ├── SanFranBG.java
│ │ │ │ └── SharkBG.java
│ │ │ ├── io/
│ │ │ │ ├── CurrentFolderConfig.java
│ │ │ │ ├── FileChooserUtils.java
│ │ │ │ └── RecentArchivesConfig.java
│ │ │ ├── methodscount/
│ │ │ │ └── MethodsCountPanel.java
│ │ │ ├── reducer/
│ │ │ │ └── Reducer.java
│ │ │ ├── toolbar/
│ │ │ │ ├── KeyUtils.java
│ │ │ │ ├── RecentArchivesButton.java
│ │ │ │ ├── Toolbar.java
│ │ │ │ └── ToolbarController.java
│ │ │ └── tree/
│ │ │ ├── CellRenderer.java
│ │ │ ├── FilesTree.java
│ │ │ └── NodeInfo.java
│ │ ├── settings/
│ │ │ ├── SettingsFrame.java
│ │ │ └── ThemeChosenListener.java
│ │ └── theme/
│ │ ├── SwingThemeApplier.java
│ │ ├── Theme.java
│ │ ├── ThemeManager.java
│ │ ├── dark/
│ │ │ ├── DarkColorScheme.java
│ │ │ ├── DarkIconScheme.java
│ │ │ └── DarkTheme.java
│ │ └── light/
│ │ ├── LightColorScheme.java
│ │ ├── LightIconScheme.java
│ │ └── LightTheme.java
│ ├── silverghost/
│ │ ├── FullArchiveReader.java
│ │ ├── SilverGhost.java
│ │ ├── SilverGhostFacade.java
│ │ ├── TokensMapper.java
│ │ ├── contentreader/
│ │ │ ├── BinaryContentReader.java
│ │ │ ├── ContentReader.java
│ │ │ ├── aar/
│ │ │ │ └── AarReader.java
│ │ │ ├── apk/
│ │ │ │ └── ApkReader.java
│ │ │ ├── clazz/
│ │ │ │ ├── ClassNameVisitor.java
│ │ │ │ └── ClazzReader.java
│ │ │ ├── dex/
│ │ │ │ ├── DexReader.java
│ │ │ │ └── DexlibLoader.java
│ │ │ └── jar/
│ │ │ └── JarReader.java
│ │ ├── exporter/
│ │ │ ├── Exporter.java
│ │ │ ├── FlatMethodCountExporter.java
│ │ │ ├── MethodCountExporter.java
│ │ │ └── TreeMethodCountExporter.java
│ │ ├── io/
│ │ │ └── SherlockHash.java
│ │ ├── methodscounter/
│ │ │ ├── ClassInfo.java
│ │ │ ├── ClassNode.java
│ │ │ └── RootBuilder.java
│ │ ├── plugins/
│ │ │ ├── EmptyFullArchiveReader.java
│ │ │ └── IdentityMapper.java
│ │ └── translator/
│ │ ├── Translator.java
│ │ ├── TranslatorFactory.java
│ │ ├── apk/
│ │ │ ├── ApkTranslator.java
│ │ │ └── dashboard/
│ │ │ ├── ApkDashboard.java
│ │ │ ├── ApkNativeMethodsVisitor.java
│ │ │ ├── ClassesDexDataEntry.java
│ │ │ ├── DynamicSymbolsInspector.java
│ │ │ ├── JavaDependenciesInspector.java
│ │ │ ├── PrivateNativeLibsInspector.java
│ │ │ ├── SyntheticAccessorsInspector.java
│ │ │ ├── Table.java
│ │ │ └── manifest/
│ │ │ ├── AndroidManifestPlainTextReader.java
│ │ │ ├── ManifestInspector.java
│ │ │ └── ReceiverActionsBL.java
│ │ ├── dex/
│ │ │ ├── DexInfoTranslator.java
│ │ │ ├── DexMethodsDumper.java
│ │ │ └── DexStringsDumper.java
│ │ ├── elf/
│ │ │ ├── ElfReader.java
│ │ │ └── ElfTranslator.java
│ │ ├── jar/
│ │ │ └── JarInfoTranslator.java
│ │ ├── java/
│ │ │ ├── JavaTranslator.java
│ │ │ ├── MetaObject.java
│ │ │ ├── MetaObjectFactory.java
│ │ │ ├── MetaObjectWithMapper.java
│ │ │ ├── StressTest.java
│ │ │ ├── clazz/
│ │ │ │ ├── QualifiedTypesMap.java
│ │ │ │ ├── asm/
│ │ │ │ │ ├── ClassBytesFromJarExtractor.java
│ │ │ │ │ ├── ClassDetailsFiller.java
│ │ │ │ │ └── MetaObjectAsmClass.java
│ │ │ │ └── reflect/
│ │ │ │ ├── ClassUtils.java
│ │ │ │ └── MetaObjectClass.java
│ │ │ └── dex/
│ │ │ ├── DexlibAdapter.java
│ │ │ ├── MetaObjectDex.java
│ │ │ └── MultidexReader.java
│ │ └── xml/
│ │ ├── AndroidXmlTranslator.java
│ │ ├── XmlDecompressor.java
│ │ └── XmlHighlighter.java
│ └── updater/
│ ├── UpdateManager.java
│ ├── models/
│ │ ├── Release.java
│ │ └── ReleaseDownloadData.java
│ ├── networking/
│ │ ├── AbstractDownloader.java
│ │ ├── AbstractReleaseCallback.java
│ │ ├── CliDownloader.java
│ │ ├── GitHubApi.java
│ │ ├── GuiDownloader.java
│ │ ├── MessageRunnable.java
│ │ └── NetworkManager.java
│ └── utils/
│ ├── FileUtils.java
│ └── NamingUtils.java
├── NOTICE
├── README.md
├── Samples/
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ └── SampleGradle/
│ ├── README.md
│ ├── build.gradle
│ ├── gradlew
│ ├── gradlew.bat
│ └── src/
│ └── main/
│ └── java/
│ └── Main.java
└── third_party/
├── ASMDEX.LICENSE
└── java-binutils.LICENSE
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.gradle/
ClassySharkWS/.gradle/
ClassySharkWS/build/
ClassySharkAndroid/.idea/
ClassySharkAndroid/out/
ClassySharkAndroid/tests/
ClassySharkAndroid/app/app.iml
ClassySharkAndroid/gradle.properties
ClassySharkAndroid/gradle/wrapper/gradle-wrapper.jar
ClassySharkAndroid/gradle/wrapper/gradle-wrapper.properties
ClassySharkAndroid/gradlew
ClassySharkAndroid/gradlew.bat
ClassySharkWS/ClassySharkWS.iml
ClassySharkWS/.idea/
ClassySharkWS/out/
*.dex
*.class
*.html
*.properties
*.txt
ClassySharkWS/*_dump
ClassySharkWS/ClassyShark*.jar
ClassySharkWS/pathname
================================================
FILE: CONTRIB.md
================================================
# How to become a contributor and submit your own code
## Contributor License Agreements
We'd love to accept your sample apps and patches! Before we can take them, we
have to jump a couple of legal hurdles.
Please fill out either the individual or corporate Contributor License Agreement (CLA).
* If you are an individual writing original source code and you're sure you
own the intellectual property, then you'll need to sign an [individual CLA]
(https://developers.google.com/open-source/cla/individual).
* If you work for a company that wants to allow you to contribute your work,
then you'll need to sign a [corporate CLA]
(https://developers.google.com/open-source/cla/corporate).
Follow either of the two links above to access the appropriate CLA and
instructions for how to sign and return it. Once we receive it, we'll be able to
accept your pull requests.
## Contributing A Patch
1. Submit an issue describing your proposed change to the repo in question.
1. The repo owner will respond to your issue promptly.
1. If your proposed change is accepted, and you haven't already done so, sign a
Contributor License Agreement (see details above).
1. Fork the desired repo, develop and test your code changes.
1. Ensure that your code adheres to the existing style in the sample to which
you are contributing. Refer to the
[Android Code Style Guide]
(https://source.android.com/source/code-style.html) for the
recommended coding standards for this organization.
1. Ensure that your code has an appropriate set of unit tests which all pass.
1. Submit a pull request.
================================================
FILE: ClassySharkAndroid/.gitignore
================================================
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
================================================
FILE: ClassySharkAndroid/ClassySharkAndroid.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="ClassySharkAndroid" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: ClassySharkAndroid/app/.gitignore
================================================
/build
================================================
FILE: ClassySharkAndroid/app/build.gradle
================================================
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.google.classysharkandroid"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.google.guava:guava:18.0'
}
================================================
FILE: ClassySharkAndroid/app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/bfarber/DevTools/android-sdk-macosx/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
================================================
FILE: ClassySharkAndroid/app/src/androidTest/java/com/google/classysharkandroid/activities/classysharkandroid/ApplicationTest.java
================================================
package com.google.classysharkandroid.activities.classysharkandroid;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.classysharkandroid" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.google.classysharkandroid.activities.MainActivity"
android:label="@string/app_name"
android:configChanges="orientation"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.google.classysharkandroid.activities.ClassesListActivity"
android:label="@string/app_name"
android:configChanges="orientation"
android:screenOrientation="portrait">
<!-- For email attachments -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
host="*"
android:mimeType="application/*"
android:pathPattern=".*.class"
android:scheme="content" />
</intent-filter>
<!-- For email attachments -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
host="*"
android:mimeType="application/zip"
android:pathPattern=".*.class"
android:scheme="content" />
</intent-filter>
<!-- For email attachments -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
host="*"
android:mimeType="application/jar"
android:pathPattern=".*.class"
android:scheme="content" />
</intent-filter>
<!-- For email attachments -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
host="*"
android:mimeType="application/apk"
android:pathPattern=".*.class"
/>
</intent-filter>
<!-- For file browsers -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
host="*"
android:mimeType="application/*"
android:pathPattern=".*.class"
android:scheme="file" />
</intent-filter>
</activity>
<activity
android:name="com.google.classysharkandroid.activities.SourceViewerActivity"
android:label="@string/title_activity_source_viewer"
android:configChanges="orientation"
android:screenOrientation="portrait">
</activity>
</application>
</manifest>
================================================
FILE: ClassySharkAndroid/app/src/main/assets/prettify.css
================================================
.str{color:#EC7600}.kwd{color:#93C763}.com{color:#66747B}.typ{color:#678CB1}.lit{color:#FACD22}.pun{color:#F1F2F3}.pln{color:#F1F2F3}.tag{color:#8AC763}.atn{color:#E0E2E4}.atv{color:#EC7600}.dec{color:purple}pre.prettyprint{border:0 solid #888}ol.linenums{margin-top:0;margin-bottom:0}.prettyprint{background:#000}li.L0,li.L1,li.L2,li.L3,li.L4,li.L5,li.L6,li.L7,li.L8,li.L9{color:#555;list-style-type:decimal}li.L1,li.L3,li.L5,li.L7,li.L9{background:#111}@media print{.str{color:#060}.kwd{color:#006;font-weight:700}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:700}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006;font-weight:700}.atn{color:#404}.atv{color:#060}}
================================================
FILE: ClassySharkAndroid/app/src/main/assets/prettify.js
================================================
!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
(a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=
a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)];
if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=
g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol");
r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,
t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),
["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,
hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&
o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=
{h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,
h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}()
================================================
FILE: ClassySharkAndroid/app/src/main/assets/run_prettify.js
================================================
!function(){var r=null;
(function(){function X(e){function j(){try{J.doScroll("left")}catch(e){P(j,50);return}w("poll")}function w(j){if(!(j.type=="readystatechange"&&x.readyState!="complete")&&((j.type=="load"?n:x)[z](i+j.type,w,!1),!m&&(m=!0)))e.call(n,j.type||j)}var Y=x.addEventListener,m=!1,C=!0,t=Y?"addEventListener":"attachEvent",z=Y?"removeEventListener":"detachEvent",i=Y?"":"on";if(x.readyState=="complete")e.call(n,"lazy");else{if(x.createEventObject&&J.doScroll){try{C=!n.frameElement}catch(A){}C&&j()}x[t](i+"DOMContentLoaded",
w,!1);x[t](i+"readystatechange",w,!1);n[t](i+"load",w,!1)}}function Q(){S&&X(function(){var e=K.length;$(e?function(){for(var j=0;j<e;++j)(function(e){P(function(){n.exports[K[e]].apply(n,arguments)},0)})(j)}:void 0)})}for(var n=window,P=n.setTimeout,x=document,J=x.documentElement,L=x.head||x.getElementsByTagName("head")[0]||J,z="",A=x.scripts,m=A.length;--m>=0;){var M=A[m],T=M.src.match(/^[^#?]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);if(T){z=T[1]||"";M.parentNode.removeChild(M);break}}var S=!0,D=
[],N=[],K=[];z.replace(/[&?]([^&=]+)=([^&]+)/g,function(e,j,w){w=decodeURIComponent(w);j=decodeURIComponent(j);j=="autorun"?S=!/^[0fn]/i.test(w):j=="lang"?D.push(w):j=="skin"?N.push(w):j=="callback"&&K.push(w)});m=0;for(z=D.length;m<z;++m)(function(){var e=x.createElement("script");e.onload=e.onerror=e.onreadystatechange=function(){if(e&&(!e.readyState||/loaded|complete/.test(e.readyState)))e.onerror=e.onload=e.onreadystatechange=r,--R,R||P(Q,0),e.parentNode&&e.parentNode.removeChild(e),e=r};e.type=
"text/javascript";e.src="file:///android_asset/lang-"+encodeURIComponent(D[m])+".js";L.insertBefore(e,L.firstChild)})(D[m]);for(var R=D.length,A=[],m=0,z=N.length;m<z;++m)A.push("file:///android_asset/"+encodeURIComponent(N[m])+".css");A.push("file:///android_asset/prettify.css");(function(e){function j(m){if(m!==w){var n=x.createElement("link");n.rel="stylesheet";n.type="text/css";if(m+1<w)n.error=
n.onerror=function(){j(m+1)};n.href=e[m];L.appendChild(n)}}var w=e.length;j(0)})(A);var $=function(){window.PR_SHOULD_USE_CONTINUATION=!0;var e;(function(){function j(a){function d(f){var b=f.charCodeAt(0);if(b!==92)return b;var a=f.charAt(1);return(b=i[a])?b:"0"<=a&&a<="7"?parseInt(f.substring(1),8):a==="u"||a==="x"?parseInt(f.substring(2),16):f.charCodeAt(1)}function h(f){if(f<32)return(f<16?"\\x0":"\\x")+f.toString(16);f=String.fromCharCode(f);return f==="\\"||f==="-"||f==="]"||f==="^"?"\\"+f:
f}function b(f){var b=f.substring(1,f.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),f=[],a=b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,g=b.length;a<g;++a){var k=b[a];if(/\\[bdsw]/i.test(k))c.push(k);else{var k=d(k),o;a+2<g&&"-"===b[a+1]?(o=d(b[a+2]),a+=2):o=k;f.push([k,o]);o<65||k>122||(o<65||k>90||f.push([Math.max(65,k)|32,Math.min(o,90)|32]),o<97||k>122||f.push([Math.max(97,k)&-33,Math.min(o,122)&-33]))}}f.sort(function(f,a){return f[0]-
a[0]||a[1]-f[1]});b=[];g=[];for(a=0;a<f.length;++a)k=f[a],k[0]<=g[1]+1?g[1]=Math.max(g[1],k[1]):b.push(g=k);for(a=0;a<b.length;++a)k=b[a],c.push(h(k[0])),k[1]>k[0]&&(k[1]+1>k[0]&&c.push("-"),c.push(h(k[1])));c.push("]");return c.join("")}function e(f){for(var a=f.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],g=0,k=0;g<c;++g){var o=a[g];o==="("?++k:"\\"===o.charAt(0)&&(o=+o.substring(1))&&(o<=k?d[o]=-1:a[g]=h(o))}for(g=
1;g<d.length;++g)-1===d[g]&&(d[g]=++j);for(k=g=0;g<c;++g)o=a[g],o==="("?(++k,d[k]||(a[g]="(?:")):"\\"===o.charAt(0)&&(o=+o.substring(1))&&o<=k&&(a[g]="\\"+d[o]);for(g=0;g<c;++g)"^"===a[g]&&"^"!==a[g+1]&&(a[g]="");if(f.ignoreCase&&F)for(g=0;g<c;++g)o=a[g],f=o.charAt(0),o.length>=2&&f==="["?a[g]=b(o):f!=="\\"&&(a[g]=o.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var j=0,F=!1,l=!1,I=0,c=a.length;I<c;++I){var p=a[I];if(p.ignoreCase)l=
!0;else if(/[a-z]/i.test(p.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){F=!0;l=!1;break}}for(var i={b:8,t:9,n:10,v:11,f:12,r:13},q=[],I=0,c=a.length;I<c;++I){p=a[I];if(p.global||p.multiline)throw Error(""+p);q.push("(?:"+e(p)+")")}return RegExp(q.join("|"),l?"gi":"g")}function m(a,d){function h(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)h(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)e[l]="\n",F[l<<1]=j++,F[l++<<1|1]=a}}else if(c==
3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),e[l]=c,F[l<<1]=j,j+=c.length,F[l++<<1|1]=a)}var b=/(?:^|\s)nocode(?:\s|$)/,e=[],j=0,F=[],l=0;h(a);return{a:e.join("").replace(/\n$/,""),d:F}}function n(a,d,h,b){d&&(a={a:d,e:a},h(a),b.push.apply(b,a.g))}function x(a){for(var d=void 0,h=a.firstChild;h;h=h.nextSibling)var b=h.nodeType,d=b===1?d?a:h:b===3?S.test(h.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function h(a){for(var l=a.e,j=[l,"pln"],c=
0,p=a.a.match(e)||[],m={},q=0,f=p.length;q<f;++q){var B=p[q],y=m[B],u=void 0,g;if(typeof y==="string")g=!1;else{var k=b[B.charAt(0)];if(k)u=B.match(k[1]),y=k[0];else{for(g=0;g<i;++g)if(k=d[g],u=B.match(k[1])){y=k[0];break}u||(y="pln")}if((g=y.length>=5&&"lang-"===y.substring(0,5))&&!(u&&typeof u[1]==="string"))g=!1,y="src";g||(m[B]=y)}k=c;c+=B.length;if(g){g=u[1];var o=B.indexOf(g),H=o+g.length;u[2]&&(H=B.length-u[2].length,o=H-g.length);y=y.substring(5);n(l+k,B.substring(0,o),h,j);n(l+k+o,g,A(y,
g),j);n(l+k+H,B.substring(H),h,j)}else j.push(l+k,y)}a.g=j}var b={},e;(function(){for(var h=a.concat(d),l=[],i={},c=0,p=h.length;c<p;++c){var m=h[c],q=m[3];if(q)for(var f=q.length;--f>=0;)b[q.charAt(f)]=m;m=m[1];q=""+m;i.hasOwnProperty(q)||(l.push(m),i[q]=r)}l.push(/[\S\s]/);e=j(l)})();var i=d.length;return h}function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,
r,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,r,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,r,"\"'"]);a.verbatimStrings&&h.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,r]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,r,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,
r,"#"]),h.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,r])):d.push(["com",/^#[^\n\r]*/,r,"#"]));a.cStyleComments&&(h.push(["com",/^\/\/[^\n\r]*/,r]),h.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,r]));if(b=a.regexLiterals){var e=(b=b>1?"":"\n\r")?".":"[\\S\\s]";h.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+
("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+e+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+e+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&h.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&h.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),r]);d.push(["pln",/^\s+/,r," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");h.push(["lit",/^@[$_a-z][\w$@]*/i,r],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,r],["pln",/^[$_a-z][\w$@]*/i,r],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,
r,"0123456789"],["pln",/^\\[\S\s]?/,r],["pun",RegExp(b),r]);return C(d,h)}function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.className))if("br"===a.nodeName)e(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&h){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(l.createTextNode(d),a.nextSibling),e(a),c||a.parentNode.removeChild(a)}}
function e(a){function b(a,c){var d=c?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),h=a.nextSibling;f.appendChild(d);for(var e=h;e;e=h)h=e.nextSibling,f.appendChild(e)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var j=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,l=a.ownerDocument,i=l.createElement("li");a.firstChild;)i.appendChild(a.firstChild);for(var c=[i],p=0;p<c.length;++p)b(c[p]);d===(d|0)&&c[0].setAttribute("value",
d);var n=l.createElement("ol");n.className="linenums";for(var d=Math.max(0,d-1|0)||0,p=0,q=c.length;p<q;++p)i=c[p],i.className="L"+(p+d)%10,i.firstChild||i.appendChild(l.createTextNode("\u00a0")),n.appendChild(i);a.appendChild(n)}function i(a,d){for(var h=d.length;--h>=0;){var b=d[h];U.hasOwnProperty(b)?V.console&&console.warn("cannot override language handler %s",b):U[b]=a}}function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return U[a]}function D(a){var d=
a.h;try{var h=m(a.c,a.i),b=h.a;a.a=b;a.d=h.d;a.e=0;A(d,b)(a);var e=/\bMSIE\s(\d+)/.exec(navigator.userAgent),e=e&&+e[1]<=8,d=/\n/g,i=a.a,j=i.length,h=0,l=a.d,n=l.length,b=0,c=a.g,p=c.length,t=0;c[p]=j;var q,f;for(f=q=0;f<p;)c[f]!==c[f+2]?(c[q++]=c[f++],c[q++]=c[f++]):f+=2;p=q;for(f=q=0;f<p;){for(var x=c[f],y=c[f+1],u=f+2;u+2<=p&&c[u+1]===y;)u+=2;c[q++]=x;c[q++]=y;f=u}c.length=q;var g=a.c,k;if(g)k=g.style.display,g.style.display="none";try{for(;b<n;){var o=l[b+2]||j,H=c[t+2]||j,u=Math.min(o,H),E=l[b+
1],W;if(E.nodeType!==1&&(W=i.substring(h,u))){e&&(W=W.replace(d,"\r"));E.nodeValue=W;var Z=E.ownerDocument,s=Z.createElement("span");s.className=c[t+1];var z=E.parentNode;z.replaceChild(s,E);s.appendChild(E);h<o&&(l[b+1]=E=Z.createTextNode(i.substring(u,o)),z.insertBefore(E,s.nextSibling))}h=u;h>=o&&(b+=2);h>=H&&(t+=2)}}finally{if(g)g.style.display=k}}catch(v){V.console&&console.log(v&&v.stack||v)}}var V=window,G=["break,continue,do,else,for,if,return,while"],O=[[G,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],J=[O,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],K=[O,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
L=[K,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],O=[O,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],M=[G,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
N=[G,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],R=[G,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],G=[G,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
S=/\S/,T=t({keywords:[J,L,O,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",M,N,G],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};i(T,["default-code"]);i(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);i(C([["pln",/^\s+/,r," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,r,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);i(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);i(t({keywords:J,hashComments:!0,cStyleComments:!0,types:Q}),["c","cc","cpp","cxx","cyc","m"]);i(t({keywords:"null,true,false"}),["json"]);i(t({keywords:L,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Q}),
["cs"]);i(t({keywords:K,cStyleComments:!0}),["java"]);i(t({keywords:G,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);i(t({keywords:M,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);i(t({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);i(t({keywords:N,
hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);i(t({keywords:O,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);i(t({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);i(t({keywords:R,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
i(C([],[["str",/^[\S\s]+/]]),["regex"]);var X=V.PR={createSimpleLexer:C,registerLangHandler:i,sourceDecorator:t,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:function(a,d,e){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;e&&z(b,e,!0);D({h:d,j:e,c:b,i:1});return b.innerHTML},
prettyPrint:e=e=function(a,d){function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p<j.length&&c.now()<b;p++){for(var d=j[p],m=k,l=d;l=l.previousSibling;){var n=l.nodeType,s=(n===7||n===8)&&l.nodeValue;if(s?!/^\??prettify\b/.test(s):n!==3||/\S/.test(l.nodeValue))break;if(s){m={};s.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){m[b]=c});break}}l=d.className;if((m!==k||f.test(l))&&!w.test(l)){n=!1;for(s=d.parentNode;s;s=s.parentNode)if(g.test(s.tagName)&&s.className&&f.test(s.className)){n=
!0;break}if(!n){d.className+=" prettyprinted";n=m.lang;if(!n){var n=l.match(q),A;if(!n&&(A=x(d))&&u.test(A.tagName))n=A.className.match(q);n&&(n=n[1])}if(y.test(d.tagName))s=1;else var s=d.currentStyle,v=i.defaultView,s=(s=s?s.whiteSpace:v&&v.getComputedStyle?v.getComputedStyle(d,r).getPropertyValue("white-space"):0)&&"pre"===s.substring(0,3);v=m.linenums;if(!(v=v==="true"||+v))v=(v=l.match(/\blinenums\b(?::(\d+))?/))?v[1]&&v[1].length?+v[1]:!0:!1;v&&z(d,v,s);t={h:n,c:d,j:v,i:s};D(t)}}}p<j.length?
P(e,250):"function"===typeof a&&a()}for(var b=d||document.body,i=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],j=[],m=0;m<b.length;++m)for(var l=0,n=b[m].length;l<n;++l)j.push(b[m][l]);var b=r,c=Date;c.now||(c={now:function(){return+new Date}});var p=0,t,q=/\blang(?:uage)?-([\w.]+)(?!\S)/,f=/\bprettyprint\b/,w=/\bprettyprinted\b/,y=/pre|xmp/i,u=/^code$/i,g=/^(?:pre|code|xmp)$/i,k={};e()}};typeof define==="function"&&define.amd&&
define("google-code-prettify",[],function(){return X})})();return e}();R||P(Q,0)})();}()
================================================
FILE: ClassySharkAndroid/app/src/main/assets/sons-of-obsidian.css
================================================
.str{color:#EC7600}.kwd{color:#93C763}.com{color:#66747B}.typ{color:#678CB1}.lit{color:#FACD22}.pun{color:#F1F2F3}.pln{color:#F1F2F3}.tag{color:#8AC763}.atn{color:#E0E2E4}.atv{color:#EC7600}.dec{color:purple}pre.prettyprint{border:0 solid #888}ol.linenums{margin-top:0;margin-bottom:0}.prettyprint{background:#000}li.L0,li.L1,li.L2,li.L3,li.L4,li.L5,li.L6,li.L7,li.L8,li.L9{color:#555;list-style-type:decimal}li.L1,li.L3,li.L5,li.L7,li.L9{background:#111}@media print{.str{color:#060}.kwd{color:#006;font-weight:700}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:700}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006;font-weight:700}.atn{color:#404}.atv{color:#060}}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/activities/ClassesListActivity.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.activities;
import android.app.ProgressDialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.Toast;
import com.google.classysharkandroid.R;
import com.google.classysharkandroid.adapters.StableArrayAdapter;
import com.google.classysharkandroid.dex.DexLoaderBuilder;
import com.google.classysharkandroid.reflector.ClassesNamesList;
import com.google.classysharkandroid.reflector.Reflector;
import com.google.classysharkandroid.utils.IOUtils;
import com.google.classysharkandroid.utils.UriUtils;
import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Enumeration;
import dalvik.system.DexClassLoader;
import dalvik.system.DexFile;
public class ClassesListActivity extends AppCompatActivity {
public static final String SELECTED_CLASS_NAME = "SELECTED_CLASS_NAME";
public static final String SELECTED_CLASS_DUMP = "SELECTED_CLASS_DUMP";
private Uri uriFromIntent;
private ClassesNamesList classesList;
private ListView lv;
private ProgressDialog mProgressDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_classes_list);
lv = (ListView) findViewById(R.id.listView);
uriFromIntent = getIntent().getData();
classesList = new ClassesNamesList();
setActionBar();
InputStream uriStream;
try {
mProgressDialog = new ProgressDialog(ClassesListActivity.this);
mProgressDialog.setIcon(R.mipmap.ic_launcher);
mProgressDialog.setMessage("¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º>");
mProgressDialog.setIndeterminate(false);
mProgressDialog.setCancelable(false);
mProgressDialog.show();
uriStream = UriUtils.getStreamFromUri(ClassesListActivity.this,
uriFromIntent);
final byte[] bytes = IOUtils.toByteArray(uriStream);
new FillClassesNamesThread(bytes).start();
new StartDexLoaderThread(bytes).start();
} catch (Exception e) {
e.printStackTrace();
}
}
private void setActionBar() {
ActionBar bar = getSupportActionBar();
String title = "Content";
if(getIntent().getStringExtra(MainActivity.APP_NAME) != null) {
title = getIntent().getStringExtra(MainActivity.APP_NAME);
}
bar.setTitle((Html.fromHtml("<font color=\"#FFFF80\">" +
title + "</font>")));
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
private class FillClassesNamesThread extends Thread {
private final byte[] bytes;
public FillClassesNamesThread(byte[] bytes) {
this.bytes = bytes;
}
@Override
public void run() {
try {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
File incomeFile = File.createTempFile("classes" + Thread.currentThread().getId(), ".dex", getCacheDir());
IOUtils.bytesToFile(bytes, incomeFile);
File optimizedFile = File.createTempFile("opt" + Thread.currentThread().getId(), ".dex", getCacheDir());
DexFile dx = DexFile.loadDex(incomeFile.getPath(),
optimizedFile.getPath(), 0);
for (Enumeration<String> classNames = dx.entries(); classNames.hasMoreElements(); ) {
String className = classNames.nextElement();
classesList.add(className);
}
} catch (Exception e) {
// ODEX, need to see how to handle
e.printStackTrace();
}
ClassesListActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
final ArrayList<String> list = new ArrayList<>();
for (int i = 0; i < classesList.getClassNames().size(); ++i) {
list.add(classesList.getClassNames().get(i));
}
final StableArrayAdapter adapter = new StableArrayAdapter(ClassesListActivity.this,
android.R.layout.simple_list_item_1, list);
lv.setAdapter(adapter);
mProgressDialog.dismiss();
if(classesList.getClassNames().isEmpty()) {
Toast.makeText(ClassesListActivity.this, "Sorry don't support ODEX", Toast.LENGTH_LONG).show();
}
}
});
}
}
private class StartDexLoaderThread extends Thread {
private final byte[] bytes;
public StartDexLoaderThread(byte[] bytes) {
this.bytes = bytes;
}
@Override
public void run() {
try {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
final DexClassLoader loader = DexLoaderBuilder.fromBytes(ClassesListActivity.this, bytes);
ClassesListActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
Class<?> loadClass;
try {
loadClass = loader.loadClass(classesList.getClassName(position));
Reflector reflector = new Reflector(loadClass);
reflector.generateClassData();
String result = reflector.toString();
Intent i = new Intent(ClassesListActivity.this,
SourceViewerActivity.class);
i.putExtra(ClassesListActivity.SELECTED_CLASS_NAME,
classesList.getClassName(position));
i.putExtra(ClassesListActivity.SELECTED_CLASS_DUMP,
result);
startActivity(i);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/activities/MainActivity.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.activities;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.webkit.MimeTypeMap;
import android.widget.AdapterView;
import android.widget.ListView;
import com.google.classysharkandroid.R;
import com.google.classysharkandroid.adapters.StableArrayAdapter;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class MainActivity extends AppCompatActivity {
public static final String APP_NAME = "APP_NAME";
private ListView lv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lv = (ListView) findViewById(R.id.listView);
}
@Override
public void onStart() {
super.onStart();
final ArrayList<AppListNode> apps = new ArrayList<>();
final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List pkgAppsList = getPackageManager().queryIntentActivities(mainIntent, 0);
for (Object object : pkgAppsList) {
ResolveInfo info = (ResolveInfo) object;
File file = new File(info.activityInfo.applicationInfo.publicSourceDir);
AppListNode aln = new AppListNode();
aln.name = info.activityInfo.applicationInfo.processName.toString();
aln.file = file;
apps.add(aln);
}
Collections.sort(apps);
final StableArrayAdapter adapter = new StableArrayAdapter(MainActivity.this,
android.R.layout.simple_list_item_1, convert(apps));
lv.setAdapter(adapter);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
MimeTypeMap myMime = MimeTypeMap.getSingleton();
Intent newIntent = new Intent(MainActivity.this, ClassesListActivity.class);
String mimeType = myMime.getMimeTypeFromExtension("apk");
newIntent.setDataAndType(Uri.fromFile(apps.get(position).file),mimeType);
newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
newIntent.putExtra(APP_NAME, apps.get(position).name);
try {
startActivity(newIntent);
} catch (ActivityNotFoundException e) {
}
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
private static List<String> convert(ArrayList<AppListNode> apps) {
ArrayList<String> result = new ArrayList<>();
for(AppListNode node : apps) {
result.add(node.name);
}
return result;
}
private static class AppListNode implements Comparable<AppListNode> {
public String name;
public File file;
@Override
public int compareTo(AppListNode another) {
return this.name.compareTo(another.name);
}
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/activities/SourceViewerActivity.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.activities;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.google.classysharkandroid.R;
import com.google.common.html.HtmlEscapers;
public class SourceViewerActivity extends AppCompatActivity {
private String sourceCodeText;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_source_viewer);
getWindow().getDecorView().setBackgroundColor(Color.BLACK);
ActionBar bar = getSupportActionBar();
bar.setBackgroundDrawable(new ColorDrawable(0xff606060));
String result = "";
try {
String name = getIntent().getStringExtra(ClassesListActivity.SELECTED_CLASS_NAME);
String barName = name.substring(name.lastIndexOf(".") + 1);
bar.setTitle((Html.fromHtml("<font color=\"#FFFF80\">" +
barName + "</font>")));
result = getIntent().getStringExtra(ClassesListActivity.SELECTED_CLASS_DUMP);
} catch (Exception e) {
e.printStackTrace();
}
sourceCodeText = result;
sourceCodeText = HtmlEscapers.htmlEscaper().escape(sourceCodeText);
WebView webView = (WebView) findViewById(R.id.source_view);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setDefaultTextEncodingName("utf-8");
webView.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
}
});
webView.loadDataWithBaseURL("file:///android_asset/", "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><script src=\"run_prettify.js?skin=sons-of-obsidian\"></script></head><body bgcolor=\"#000000\"><pre class=\"prettyprint \">" + sourceCodeText + "</pre></body></html>", "text/html", "UTF-8", null);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/adapters/StableArrayAdapter.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.adapters;
import android.content.Context;
import android.widget.ArrayAdapter;
import java.util.HashMap;
import java.util.List;
public class StableArrayAdapter extends ArrayAdapter<String> {
HashMap<String, Integer> mIdMap = new HashMap<>();
public StableArrayAdapter(Context context, int textViewResourceId,
List<String> objects) {
super(context, textViewResourceId, objects);
for (int i = 0; i < objects.size(); ++i) {
mIdMap.put(objects.get(i), i);
}
}
@Override
public long getItemId(int position) {
String item = getItem(position);
return mIdMap.get(item);
}
@Override
public boolean hasStableIds() {
return true;
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/dex/DexLoaderBuilder.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.dex;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import android.content.Context;
import com.google.classysharkandroid.utils.IOUtils;
import dalvik.system.DexClassLoader;
public class DexLoaderBuilder {
private static final int BUF_SIZE = 8 * 1024;
private DexLoaderBuilder() {
}
public static DexClassLoader fromFile(Context context, final File dexFile) throws Exception {
FileInputStream fileInputStream = new FileInputStream(dexFile);
byte[] bFile = IOUtils.toByteArray(fileInputStream);
return fromBytes(context, bFile);
}
public static DexClassLoader fromBytes(Context context, final byte[] dexBytes) throws Exception {
if (null == context) {
throw new RuntimeException("No context provided");
}
String dexFileName = "internal.dex";
final File dexInternalStoragePath = new File(context.getDir("dex", Context.MODE_PRIVATE), dexFileName);
if (!dexInternalStoragePath.exists()) {
prepareDex(dexBytes, dexInternalStoragePath);
}
final File optimizedDexOutputPath = context.getCodeCacheDir();
DexClassLoader loader = new DexClassLoader(dexInternalStoragePath.getAbsolutePath(),
optimizedDexOutputPath.getAbsolutePath(), null, context.getClassLoader().getParent());
dexInternalStoragePath.delete();
return loader;
}
private static boolean prepareDex(byte[] bytes, File dexInternalStoragePath) {
BufferedInputStream bis = null;
OutputStream dexWriter = null;
try {
bis = new BufferedInputStream(new ByteArrayInputStream(bytes));
dexWriter = new BufferedOutputStream(new FileOutputStream(dexInternalStoragePath));
byte[] buf = new byte[BUF_SIZE];
int len;
while ((len = bis.read(buf, 0, BUF_SIZE)) > 0) {
dexWriter.write(buf, 0, len);
}
dexWriter.close();
bis.close();
return true;
} catch (IOException e) {
if (dexWriter != null) {
try {
dexWriter.close();
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
}
if (bis != null) {
try {
bis.close();
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
}
return false;
}
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/ClassTypeAlgorithm.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.reflector;
import java.util.Hashtable;
public class ClassTypeAlgorithm {
private ClassTypeAlgorithm() {
}
public static String TypeName(String nm, Hashtable ht) {
String yy;
String arr;
if (nm.charAt(0) != '[') {
int i = nm.lastIndexOf(".");
if (i == -1)
return nm; // It's a primitive type, ignore it.
else {
yy = nm.substring(i + 1);
if (ht != null)
ht.put(nm, yy); // note class types in the hashtable.
return yy;
}
}
arr = "[]";
if (nm.charAt(1) == '[')
yy = TypeName(nm.substring(1), ht);
else {
switch (nm.charAt(1)) {
case 'L':
yy = TypeName(nm.substring(nm.indexOf("L") + 1, nm.indexOf(";")), ht);
break;
case 'I':
yy = "int";
break;
case 'V':
yy = "void";
break;
case 'C':
yy = "char";
break;
case 'D':
yy = "double";
break;
case 'F':
yy = "float";
break;
case 'J':
yy = "long";
break;
case 'S':
yy = "short";
break;
case 'Z':
yy = "boolean";
break;
case 'B':
yy = "byte";
break;
default:
yy = "BOGUS:" + nm;
break;
}
}
return yy + arr;
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/ClassesNamesList.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.reflector;
import java.util.LinkedList;
import java.util.List;
public class ClassesNamesList {
private List<String> list;
public ClassesNamesList() {
list = new LinkedList<>();
}
public void add(String className) {
list.add(className);
}
public List<String> getClassNames() {
return this.list;
}
public String getClassName(int position) {
return this.list.get(position);
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/Reflector.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.reflector;
import java.lang.reflect.*;
import java.util.*;
public class Reflector {
private Class clazz;
private List<TaggedWord> words;
public enum TAG {
MODIFIER, IDENTIFIER, DOCUMENT
}
public static class TaggedWord {
public TaggedWord(String word, TAG tag) {
this.text = word;
this.tag = tag;
}
public String text;
public TAG tag;
}
public Reflector(Class clazz) {
this.clazz = clazz;
words = new ArrayList<>();
}
public String toString() {
if (words == null) {
return "";
} else {
StringBuilder sb = new StringBuilder();
for (TaggedWord word : words) {
sb.append(word.text);
}
return sb.toString();
}
}
public List<TaggedWord> getWords() {
return this.words;
}
public void generateClassData() {
long start = System.currentTimeMillis();
Constructor constructors[];
Class cc[];
Method methods[];
Field fields[];
Class currentClass = null;
Class supClass;
String x, y;
Hashtable classRef;
currentClass = clazz;
/*
* Step 0: If our name contains dots we're in a package so put
* that out first.
*/
x = currentClass.getName();
if (x.lastIndexOf(".") != -1) {
y = x.substring(0, x.lastIndexOf("."));
words.add(new TaggedWord("\npackage ", TAG.MODIFIER));
words.add(new TaggedWord(y, TAG.IDENTIFIER));
words.add(new TaggedWord(";", TAG.MODIFIER));
}
fields = currentClass.getDeclaredFields();
constructors = currentClass.getDeclaredConstructors();
methods = currentClass.getDeclaredMethods();
classRef = generateDependencies(constructors, methods, fields);
// Don't import ourselves ...
classRef.remove(currentClass.getName());
fillTaggedText(constructors, methods, fields, currentClass, classRef);
long finish = System.currentTimeMillis();
System.out.println("* " + (finish - start) + "ms");
}
private Hashtable generateDependencies(Constructor[] constructors, Method[] methods, Field[] fields) {
String x, y;
Hashtable classRef = new Hashtable();
for (int i = 0; i < fields.length; i++) {
x = ClassTypeAlgorithm.TypeName(fields[i].getType().getName(), classRef);
}
for (int i = 0; i < constructors.length; i++) {
Class cx[] = constructors[i].getParameterTypes();
if (cx.length > 0) {
for (int j = 0; j < cx.length; j++) {
x = ClassTypeAlgorithm.TypeName(cx[j].getName(), classRef);
}
}
}
for (int i = 0; i < methods.length; i++) {
x = ClassTypeAlgorithm.TypeName(methods[i].getReturnType().getName(), classRef);
Class cx[] = methods[i].getParameterTypes();
if (cx.length > 0) {
for (int j = 0; j < cx.length; j++) {
x = ClassTypeAlgorithm.TypeName(cx[j].getName(), classRef);
}
}
Class<?>[] xType = methods[i].getExceptionTypes();
for (int j = 0; j < xType.length; j++) {
x = ClassTypeAlgorithm.TypeName(xType[j].getName(), classRef);
}
}
return classRef;
}
private void fillTaggedText(Constructor[] constructors, Method[] methods, Field[] fields, Class currentClass, Hashtable classRef) {
Class supClass;
String x;
for (Enumeration e = classRef.keys(); e.hasMoreElements(); ) {
Object importIdentifier = e.nextElement();
words.add(new TaggedWord("\nimport ", TAG.MODIFIER));
words.add(new TaggedWord(importIdentifier + ";", TAG.IDENTIFIER));
}
words.add(new TaggedWord("\n\n", TAG.IDENTIFIER));
int mod = currentClass.getModifiers();
words.add(new TaggedWord(Modifier.toString(mod), TAG.MODIFIER));
if (!Modifier.isInterface(mod)) {
words.add(new TaggedWord(" class", TAG.MODIFIER));
}
words.add(new TaggedWord(" " + ClassTypeAlgorithm.TypeName(currentClass.getName(), null), TAG.IDENTIFIER));
supClass = currentClass.getSuperclass();
if (supClass != null) {
words.add(new TaggedWord(" extends ", TAG.MODIFIER));
words.add(new TaggedWord(ClassTypeAlgorithm.TypeName(supClass.getName(), classRef), TAG.IDENTIFIER));
}
words.add(new TaggedWord("\n{", TAG.IDENTIFIER));
words.add(new TaggedWord("\n" +
"/*\n" +
" * Field Definitions.\n" +
" */", TAG.DOCUMENT));
for (int i = 0; i < fields.length; i++) {
Class ctmp = fields[i].getType();
int md = fields[i].getModifiers();
words.add(new TaggedWord("\n " + Modifier.toString(md) + " ", TAG.MODIFIER));
words.add(new TaggedWord(ClassTypeAlgorithm.TypeName(fields[i].getType().getName(), null) + " ",
TAG.IDENTIFIER));
words.add(new TaggedWord(fields[i].getName() + ";", TAG.DOCUMENT));
}
// TODO ENUMS members
// http://stackoverflow.com/questions/140537/how-to-use-java-reflection-when-the-enum-type-is-a-class
words.add(new TaggedWord("\n" +
"/*\n" +
" * Declared Constructors.\n" +
" */\n", TAG.DOCUMENT));
x = ClassTypeAlgorithm.TypeName(currentClass.getName(), null);
for (int i = 0; i < constructors.length; i++) {
int md = constructors[i].getModifiers();
words.add(new TaggedWord(" " + Modifier.toString(md) + " ", TAG.MODIFIER));
words.add(new TaggedWord(x, TAG.IDENTIFIER));
Class cx[] = constructors[i].getParameterTypes();
words.add(new TaggedWord("(", TAG.IDENTIFIER));
if (cx.length > 0) {
for (int j = 0; j < cx.length; j++) {
words.add(new TaggedWord(ClassTypeAlgorithm.TypeName(cx[j].getName(), null), TAG.IDENTIFIER));
if (j < (cx.length - 1)) {
words.add(new TaggedWord(", ", TAG.IDENTIFIER));
}
}
}
words.add(new TaggedWord(") { ... }\n", TAG.IDENTIFIER));
}
for (int i = 0; i < methods.length; i++) {
int md = methods[i].getModifiers();
words.add(new TaggedWord(" " + Modifier.toString(md) + " ", TAG.MODIFIER));
words.add(new TaggedWord(ClassTypeAlgorithm.TypeName(methods[i].getReturnType().getName(), null) + " ",
TAG.IDENTIFIER));
words.add(new TaggedWord(methods[i].getName(), TAG.DOCUMENT));
Class cx[] = methods[i].getParameterTypes();
words.add(new TaggedWord("(", TAG.IDENTIFIER));
if (cx.length > 0) {
for (int j = 0; j < cx.length; j++) {
words.add(new TaggedWord(ClassTypeAlgorithm.TypeName(cx[j].getName(), classRef), TAG.IDENTIFIER));
if (j < (cx.length - 1)) {
words.add(new TaggedWord(", ", TAG.IDENTIFIER));
}
}
}
words.add(new TaggedWord(") ", TAG.IDENTIFIER));
// TODO put to dependencies & imports
Class<?>[] xType = methods[i].getExceptionTypes();
if (xType.length > 0) {
words.add(new TaggedWord(" throws ", TAG.IDENTIFIER));
}
for (int j = 0; j < xType.length; j++) {
words.add(new TaggedWord(xType[j].getSimpleName(), TAG.IDENTIFIER));
}
words.add(new TaggedWord("{ ... }\n", TAG.IDENTIFIER));
}
words.add(new TaggedWord("\n} ", TAG.IDENTIFIER));
}
public static void main(String[] args) {
Reflector reflector = new Reflector(Integer.class);
reflector.generateClassData();
System.out.print(reflector);
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/utils/IOUtils.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.utils;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class IOUtils {
public static void bytesToFile(byte[] bytes, File result) throws IOException {
BufferedOutputStream bos =
new BufferedOutputStream(new FileOutputStream(result));
bos.write(bytes);
bos.flush();
bos.close();
}
public static byte[] toByteArray(InputStream input) throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
copy(input, output);
return output.toByteArray();
}
public static int copy(InputStream input, OutputStream output) throws IOException {
long count = copyLarge(input, output);
if (count > Integer.MAX_VALUE) {
return -1;
}
return (int) count;
}
private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
public static long copyLarge(InputStream input, OutputStream output)
throws IOException {
byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
long count = 0;
int n = 0;
while (-1 != (n = input.read(buffer))) {
output.write(buffer, 0, n);
count += n;
}
return count;
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/utils/UriUtils.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classysharkandroid.utils;
import android.content.Context;
import android.net.Uri;
import java.io.FileNotFoundException;
import java.io.InputStream;
public class UriUtils {
public static InputStream getStreamFromUri(Context context, Uri uriFromIntent) throws FileNotFoundException {
return context.getContentResolver().openInputStream(uriFromIntent);
}
public static boolean isAttach(Uri uriFromIntent) {
return (uriFromIntent != null) && (uriFromIntent.getScheme().contains("content"));
}
}
================================================
FILE: ClassySharkAndroid/app/src/main/res/layout/activity_classes_list.xml
================================================
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".ClassesListActivity">
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listView"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
/>
</RelativeLayout>
================================================
FILE: ClassySharkAndroid/app/src/main/res/layout/activity_main.xml
================================================
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity">
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listView"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
/>
</RelativeLayout>
================================================
FILE: ClassySharkAndroid/app/src/main/res/layout/activity_source_viewer.xml
================================================
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/holder"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<WebView
android:id="@+id/source_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
/>
</RelativeLayout>
================================================
FILE: ClassySharkAndroid/app/src/main/res/menu/menu_main.xml
================================================
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.apisolutions.classysharkandroid.activities.MainActivity">
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
</menu>
================================================
FILE: ClassySharkAndroid/app/src/main/res/menu/menu_source_viewer.xml
================================================
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.apisolutions.classysharkandroid.activities.SourceViewerActivity">
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
</menu>
================================================
FILE: ClassySharkAndroid/app/src/main/res/values/dimens.xml
================================================
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
================================================
FILE: ClassySharkAndroid/app/src/main/res/values/strings.xml
================================================
<resources>
<string name="app_name">ClassySharkAndroid</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="title_activity_source_viewer">SourceViewer</string>
<string name="title_activity_main">MainActivity</string>
</resources>
================================================
FILE: ClassySharkAndroid/app/src/main/res/values/styles.xml
================================================
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
</resources>
================================================
FILE: ClassySharkAndroid/app/src/main/res/values-w820dp/dimens.xml
================================================
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
================================================
FILE: ClassySharkAndroid/app/src/test/java/com/classysharkandroid/ExampleUnitTest.java
================================================
package com.apisolutions.classysharkandroid.activities.classysharkandroid;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
================================================
FILE: ClassySharkAndroid/build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
================================================
FILE: ClassySharkAndroid/settings.gradle
================================================
include ':app'
================================================
FILE: ClassySharkAndroid/snap/snapcraft.yaml
================================================
name: android-classyshark
version: '8.2'
summary: Binary analysis of any Android/Java based app/APK/game.
description: |ClassyShark is a standalone binary inspection tool for Android developers. It can reliably browse any Android executable and show important info such as class interfaces and members, dex counts and dependencies.
confinement: devmode
parts:
android-classyshark:
after: [desktop-glib-only]
plugin: gradle
source: https://codeload.github.com/android-classyshark-8.2.zip
build: |
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
gradle release -x test -x createGitTag
install: |
unzip DIST/android-classyshark_bin-*.zip -d $SNAPCRAFT_PART_INSTALL/
build-packages:
- unzip
- openjdk-8-jdk
- dexlib2
- java-binutils
apps:
android-classyshark:
command: desktop-launch $SNAP/android-classyshark-8.2/android-classyshark.sh
================================================
FILE: ClassySharkWS/build.gradle
================================================
group 'classyshark'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'java-library-distribution' // task: gradle distZip
sourceCompatibility = 1.8
repositories {
flatDir {
dirs '../third_party'
}
mavenCentral()
}
// ClassyShark doesn't follow the standard src/main/java convention
// https://docs.gradle.org/current/userguide/java_plugin.html#sec:changing_java_project_layout
sourceSets {
main {
java {
srcDirs = ['src/']
}
resources {
srcDirs = ['src/']
}
}
}
dependencies {
// local jars
compile name: 'asmdex-1.0', ext: 'jar'
compile name: 'util-2.0.6', ext: 'jar'
compile name: 'java-binutils', ext: 'jar'
// maven
compile 'org.ow2.asm:asm-all:5.2'
compile group: 'org.smali', name: 'dexlib2', version: '2.2.7'
compile 'org.apache.bcel:bcel:6.5.0'
compile 'com.squareup.retrofit2:converter-gson:2.9.0'
compile 'com.google.code.gson:gson-parent:2.9.0'
compile 'com.google.guava:guava:31.1-jre'
compile 'com.squareup.okhttp3:okhttp:4.10.0'
compile 'com.squareup.okio:okio:3.2.0'
compile 'com.squareup.retrofit2:retrofit:2.9.0'
}
jar {
manifest {
attributes(
'Main-Class': 'com.google.classyshark.Main',
"Class-Path": configurations.compile.collect { "lib/$it.name" }.join(' ')
)
}
}
// Create a single Jar with all dependencies
task fatJar(type: Jar) {
manifest {
attributes (
'Main-Class': 'com.google.classyshark.Main',
)
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
================================================
FILE: ClassySharkWS/gradlew
================================================
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
================================================
FILE: ClassySharkWS/gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: ClassySharkWS/src/META-INF/MANIFEST.MF
================================================
Manifest-Version: 1.0
Main-Class: com.google.classyshark.Main
================================================
FILE: ClassySharkWS/src/com/google/classyshark/Main.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark;
import com.google.classyshark.analytics.Analytics;
import com.google.classyshark.cli.CliMode;
import com.google.classyshark.gui.GuiMode;
import java.util.Arrays;
import java.util.List;
/**
* the driver class of the app
*/
public class Main {
private Main() {
}
private static boolean isGui(List<String> argsAsArray) {
return argsAsArray.isEmpty() || argsAsArray.get(0).equalsIgnoreCase("-open");
}
public static void main(final String[] args) {
final List<String> argsAsArray = Arrays.asList(args);
Analytics.INSTANCE.addActivation();
if (isGui(argsAsArray)) {
GuiMode.with(argsAsArray);
} else {
CliMode.with(argsAsArray);
}
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/Shark.java
================================================
/*
* Copyright 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark;
import com.google.classyshark.silverghost.SilverGhostFacade;
import java.io.File;
import java.util.LinkedList;
import java.util.List;
import static com.google.classyshark.silverghost.SilverGhostFacade.getGeneratedClassString;
/**
* The ClassyShark API usually used by build & continues integration toolchains
*/
public class Shark {
private File archiveFile;
private Shark(File archiveFile) {
this.archiveFile = archiveFile;
}
public static Shark with(File archiveFile) {
return new Shark(archiveFile);
}
/**
* @param className class name to generate such as "com.bumptech.glide.request.target.BaseTarget"
* @return
*/
public String getGeneratedClass(String className) {
return getGeneratedClassString(className, archiveFile);
}
/**
* @return list of class names
*/
public List<String> getAllClassNames() {
return SilverGhostFacade.getAllClassNames(archiveFile);
}
/**
* @return manifest
*/
public String getManifest() {
return SilverGhostFacade.getManifest(archiveFile);
}
/**
* @return all methods
*/
public List<String> getAllMethods() {
return SilverGhostFacade.getAllMethods(archiveFile);
}
/**
* @return all strings from all string tables
*/
public List<String> getAllStrings() {
return SilverGhostFacade.getAllStrings(archiveFile);
}
/**
*
* @return
*/
public boolean isMultiDex() {
return SilverGhostFacade.isMultiDex(archiveFile);
}
public boolean isCustomMultiDex() {
return SilverGhostFacade.isCustomMultiDex(archiveFile);
}
public static void main(String[] args) {
File apk =
new File("/Users/bfarber/Desktop/Scenarios/3 APKs/"
+ "com.google.samples.apps.iosched-333.apk");
Shark shark = Shark.with(apk);
System.out.println(
shark.getGeneratedClass("com.bumptech.glide.request.target.BaseTarget"));
System.out.println(shark.getAllClassNames());
System.out.println(shark.getManifest());
System.out.println(shark.getAllMethods());
//System.out.println(shark.getAllStrings());
System.out.println(shark.isMultiDex());
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/Version.java
================================================
/*
* Copyright 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark;
/**
* This class holds the current ClassyShark version
*/
public class Version {
public static final int MAJOR = 8;
public static final int MINOR = 2;
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/analytics/Analytics.java
================================================
/*
* Copyright 2017 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.analytics;
import com.google.classyshark.Version;
// based on https://github.com/siddii/jgoogleanalytics
public enum Analytics {
INSTANCE;
public void addActivation() {
JGoogleAnalyticsTracker tracker = new JGoogleAnalyticsTracker(
"ClassyShark-Activation",
Version.MAJOR + "." + Version.MINOR,
"UA-91889970-1");
FocusPoint focusPoint = new FocusPoint("Activation");
tracker.trackAsynchronously(focusPoint);
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/analytics/FocusPoint.java
================================================
/*
* Copyright 2015 Siddique Hameed
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.analytics;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
/**
* Focus point of the application. It can represent data points like application load, application module load, user actions, error events etc.
*
* @author : Siddique Hameed
* @version : 0.1
*/
public class FocusPoint {
private String name;
private FocusPoint parentFocusPoint;
private static final String URI_SEPARATOR = "/";
private static final String TITLE_SEPARATOR = "-";
public FocusPoint(String name) {
this.name = name;
}
public FocusPoint(String name, FocusPoint parentFocusPoint) {
this(name);
this.parentFocusPoint = parentFocusPoint;
}
public String getName() {
return name;
}
public void setParentTrackPoint(FocusPoint parentFocusPoint) {
this.parentFocusPoint = parentFocusPoint;
}
public FocusPoint getParentFocusPoint() {
return parentFocusPoint;
}
public String getContentURI() {
StringBuffer contentURIBuffer = new StringBuffer();
getContentURI(contentURIBuffer, this);
return contentURIBuffer.toString();
}
public String getContentTitle() {
StringBuffer titleBuffer = new StringBuffer();
getContentTitle(titleBuffer, this);
return titleBuffer.toString();
}
private void getContentURI(StringBuffer contentURIBuffer, FocusPoint focusPoint) {
FocusPoint parentFocuPoint = focusPoint.getParentFocusPoint();
if (parentFocuPoint != null) {
getContentURI(contentURIBuffer, parentFocuPoint);
}
contentURIBuffer.append(URI_SEPARATOR);
contentURIBuffer.append(encode(focusPoint.getName()));
}
private String encode(String name) {
try {
return URLEncoder.encode(name, "UTF-8");
} catch (UnsupportedEncodingException e) {
return name;
}
}
private void getContentTitle(StringBuffer titleBuffer, FocusPoint focusPoint) {
FocusPoint parentFocusPoint = focusPoint.getParentFocusPoint();
if (parentFocusPoint != null) {
getContentTitle(titleBuffer, parentFocusPoint);
titleBuffer.append(TITLE_SEPARATOR);
}
titleBuffer.append(encode(focusPoint.getName()));
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/analytics/GoogleAnalytics_v1_URLBuildingStrategy.java
================================================
/*
* Copyright 2015 Siddique Hameed
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.analytics;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.Random;
/**
* URL building logic for the earlier versions of google analytics (urchin.js)
*
* @author : Siddique Hameed
* @version : 0.1
*/
public class GoogleAnalytics_v1_URLBuildingStrategy implements URLBuildingStrategy {
private FocusPoint appFocusPoint;
private String googleAnalyticsTrackingCode;
private String refererURL = "http://www.BoxySystems.com";
private static final String TRACKING_URL_Prefix = "http://www.google-analytics.com/__utm.gif";
private static final Random random = new Random();
private static String hostName = "localhost";
static {
try {
hostName = InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException e) {
//ignore this
}
}
public GoogleAnalytics_v1_URLBuildingStrategy(String appName, String googleAnalyticsTrackingCode) {
this.googleAnalyticsTrackingCode = googleAnalyticsTrackingCode;
this.appFocusPoint = new FocusPoint(appName);
}
public GoogleAnalytics_v1_URLBuildingStrategy(String appName, String appVersion, String googleAnalyticsTrackingCode) {
this.googleAnalyticsTrackingCode = googleAnalyticsTrackingCode;
this.appFocusPoint = new FocusPoint(appVersion, new FocusPoint(appName));
}
public String buildURL(FocusPoint focusPoint) {
int cookie = random.nextInt();
int randomValue = random.nextInt(2147483647) - 1;
long now = new Date().getTime();
// String $urchinUrl="http://www.google-analytics.com/__utm.gif?utmwv=1&utmn='.$var_utmn.'&utmsr=-&utmsc=-&utmul=-&utmje=0&utmfl=-&utmdt=-&utmhn='.$var_utmhn.'&utmr='.$var_referer.'&utmp='.$var_utmp." +
// "'&utmac='.$var_utmac.'" +
// "&utmcc=__utma%3D'.$var_cookie.'.'.$var_random.'.'.$var_today.'.'.$var_today.'.'.$var_today.'.2%3B%2B__utmb%3D'.$var_cookie.'%3B%2B__utmc%3D'.$var_cookie.'%3B%2B__utmz%3D'.$var_cookie.'.'.$var_today.'.2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D'.$var_cookie.'.'.$var_uservar.'%3B";
focusPoint.setParentTrackPoint(appFocusPoint);
StringBuffer url = new StringBuffer(TRACKING_URL_Prefix);
url.append("?utmwv=1"); //Urchin/Analytics version
url.append("&utmn=" + random.nextInt());
url.append("&utmcs=UTF-8"); //document encoding
url.append("&utmsr=1440x900"); //screen resolution
url.append("&utmsc=32-bit"); //color depth
url.append("&utmul=en-us"); //user language
url.append("&utmje=1"); //java enabled
url.append("&utmfl=9.0%20%20r28"); //flash
url.append("&utmcr=1"); //carriage return
url.append("&utmdt=" + focusPoint.getContentTitle()); //The optimum keyword density //document title
url.append("&utmhn=" + hostName);//document hostname
url.append("&utmr=" + refererURL); //referer URL
url.append("&utmp=" + focusPoint.getContentURI());//document page URL
url.append("&utmac=" + googleAnalyticsTrackingCode);//Google Analytics account
url.append("&utmcc=__utma%3D'" + cookie + "." + randomValue + "." + now + "." + now + "." + now + ".2%3B%2B__utmb%3D" + cookie + "%3B%2B__utmc%3D" + cookie + "%3B%2B__utmz%3D" + cookie + "." + now + ".2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D" + cookie);
return url.toString();
}
public void setRefererURL(String refererURL) {
this.refererURL = refererURL;
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/analytics/HTTPGetMethod.java
================================================
/*
* Copyright 2015 Siddique Hameed
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.analytics;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* Simple class peforming HTTP Get method on the requested url
*
* @author : Siddique Hameed
* @version : 0.1
*/
public class HTTPGetMethod {
private static final String GET_METHOD_NAME = "GET";
private static final String SUCCESS_MESSAGE = "JGoogleAnalytics: Tracking Successful!";
private LoggingAdapter loggingAdapter = null;
public void setLoggingAdapter(LoggingAdapter loggingAdapter) {
this.loggingAdapter = loggingAdapter;
}
private static String uaName = null; // User Agent name
private static String osString = "Unknown";
HTTPGetMethod() {
// Initialise the static parameters if we need to.
if (uaName == null) {
uaName = "Java/" + System.getProperty("java.version"); // java version info appended
// os string is architecture+osname+version concatenated with _
osString = System.getProperty("os.arch");
if (osString == null || osString.length() < 1) {
osString = "";
} else {
osString += "; ";
osString += System.getProperty("os.name") + " "
+ System.getProperty("os.version");
}
}
}
public void request(String urlString) {
try {
URL url = new URL(urlString);
HttpURLConnection urlConnection = openURLConnection(url);
urlConnection.setInstanceFollowRedirects(true);
urlConnection.setRequestMethod(GET_METHOD_NAME);
urlConnection.setRequestProperty("User-agent", uaName + " ("
+ osString + ")");
urlConnection.connect();
int responseCode = getResponseCode(urlConnection);
if (responseCode != HttpURLConnection.HTTP_OK) {
logError("JGoogleAnalytics: Error tracking, url=" + urlString);
} else {
logMessage(SUCCESS_MESSAGE);
}
} catch (Exception e) {
logError(e.getMessage());
}
}
protected int getResponseCode(HttpURLConnection urlConnection)
throws IOException {
return urlConnection.getResponseCode();
}
private HttpURLConnection openURLConnection(URL url) throws IOException {
return (HttpURLConnection) url.openConnection();
}
private void logMessage(String message) {
if (loggingAdapter != null) {
loggingAdapter.logMessage(message);
}
}
private void logError(String errorMesssage) {
if (loggingAdapter != null) {
loggingAdapter.logError(errorMesssage);
}
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/analytics/JGoogleAnalyticsTracker.java
================================================
/*
* Copyright 2015 Siddique Hameed
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.analytics;
/**
* Main class for tracking google analytics data.
*
* @author : Siddique Hameed
* @version : 0.1
* @see : <a href="http://JGoogleAnalytics.googlecode.com">http://JGoogleAnalytics.googlecode.com</a>
*/
public class JGoogleAnalyticsTracker {
private URLBuildingStrategy urlBuildingStrategy = null;
private HTTPGetMethod httpRequest = new HTTPGetMethod();
private LoggingAdapter loggingAdapter;
/**
* Simple constructor passing the application name & google analytics tracking code
*
* @param appName Application name (For ex: "LibraryFinder")
* @param googleAnalyticsTrackingCode (For ex: "UA-2184000-1")
*/
public JGoogleAnalyticsTracker(String appName, String googleAnalyticsTrackingCode) {
this.urlBuildingStrategy = new GoogleAnalytics_v1_URLBuildingStrategy(appName, googleAnalyticsTrackingCode);
}
/**
* Constructor passing the application name, application version & google analytics tracking code
*
* @param appName Application name (For ex: "LibraryFinder")
* @param appVersion Application version (For ex: "1.3.1")
* @param googleAnalyticsTrackingCode (For ex: "UA-2184000-1")
*/
public JGoogleAnalyticsTracker(String appName, String appVersion, String googleAnalyticsTrackingCode) {
this.urlBuildingStrategy = new GoogleAnalytics_v1_URLBuildingStrategy(appName, appVersion, googleAnalyticsTrackingCode);
}
/**
* Setter injection for URLBuildingStrategy incase if you want to use a different url building logic.
*
* @param urlBuildingStrategy implemented instance of URLBuildingStrategy
*/
public void setUrlBuildingStrategy(URLBuildingStrategy urlBuildingStrategy) {
this.urlBuildingStrategy = urlBuildingStrategy;
}
/**
* Setter injection for LoggingAdpater. You can hook up log4j, System.out or any other loggers you want.
*
* @param loggingAdapter implemented instance of LoggingAdapter
*/
public void setLoggingAdapter(LoggingAdapter loggingAdapter) {
this.loggingAdapter = loggingAdapter;
httpRequest.setLoggingAdapter(loggingAdapter);
}
/**
* Track the focusPoint in the application synchronously. <br/>
* <red><b>Please be cognizant while using this method. Since, it would have a peformance hit on the actual application.
* Use it unless it's really needed</b></red>
*
* @param focusPoint Focus point of the application like application load, application module load, user actions, error events etc.
*/
public void trackSynchronously(FocusPoint focusPoint) {
logMessage("JGoogleAnalytics: Tracking synchronously focusPoint=" + focusPoint.getContentTitle());
httpRequest.request(urlBuildingStrategy.buildURL(focusPoint));
}
/**
* Track the focusPoint in the application asynchronously. <br/>
*
* @param focusPoint Focus point of the application like application load, application module load, user actions, error events etc.
*/
public void trackAsynchronously(FocusPoint focusPoint) {
logMessage("JGoogleAnalytics: Tracking Asynchronously focusPoint=" + focusPoint.getContentTitle());
new TrackingThread(focusPoint).start();
}
private void logMessage(String message) {
if (loggingAdapter != null) {
loggingAdapter.logMessage(message);
}
}
private class TrackingThread extends Thread {
private FocusPoint focusPoint;
public TrackingThread(FocusPoint focusPoint) {
this.focusPoint = focusPoint;
this.setPriority(Thread.MIN_PRIORITY);
}
public void run() {
httpRequest.request(urlBuildingStrategy.buildURL(focusPoint));
}
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/analytics/LoggingAdapter.java
================================================
/*
* Copyright 2015 Siddique Hameed
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.analytics;
/**
* Interface for logging adapter. You can hook up log4j, System.out or any other loggers you want.
*
* @author : Siddique Hameed
* @version : 0.1
*/
public interface LoggingAdapter {
public void logError(String errorMessage);
public void logMessage(String message);
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/analytics/URLBuildingStrategy.java
================================================
/*
* Copyright 2015 Siddique Hameed
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.analytics;
/**
* Interface for the URL building strategy
*
* @author : Siddique Hameed
* @version : 0.1
*/
public interface URLBuildingStrategy {
public String buildURL(FocusPoint focusPoint);
public void setRefererURL(String refererURL);
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/cli/CliMode.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.cli;
import com.google.classyshark.updater.UpdateManager;
import java.io.File;
import java.util.List;
import static com.google.classyshark.silverghost.SilverGhostFacade.exportArchive;
import static com.google.classyshark.silverghost.SilverGhostFacade.exportClassFromApk;
import static com.google.classyshark.silverghost.SilverGhostFacade.inspectApk;
import static com.google.classyshark.silverghost.SilverGhostFacade.inspectPackages;
/**
* Command line mode
*/
public class CliMode {
private static final String ERROR_MESSAGE = "Usage: java -jar ClassyShark.jar [-options] <archive> [args...]\n" +
" (to execute a ClassyShark on binary archive jar/apk/dex/class)\n" +
"where options include:\n" +
" -open\t open an archive with GUI \n" +
" -export\t export to file \n" +
" -methodcounts\t packages with method counts \n" +
" -inspect experimental prints apk analysis\n" +
" -update\tupdates ClassyShark" +
"\nwhere args is an optional classname\n";
private CliMode() {
}
public static void with(List<String> args) {
if (args.size() < 2) {
System.err.println("missing command line arguments " + "\n\n\n" + ERROR_MESSAGE);
return;
}
File archiveFile = new File(args.get(1));
if (!archiveFile.exists()) {
System.err.println("File doesn't exist ==> " + archiveFile + "\n\n\n" + ERROR_MESSAGE);
return;
}
final String operand = args.get(0).toLowerCase();
switch (operand) {
case "-export":
if (args.size() == 2) {
exportArchive(args);
} else {
exportClassFromApk(args);
}
break;
case "-inspect":
inspectApk(args);
break;
case "-methodcounts":
inspectPackages(args);
break;
case "-update":
UpdateManager.getInstance().checkVersionConsole();
break;
default:
System.err.println("wrong operand ==> " + operand + "\n\n\n" + ERROR_MESSAGE);
}
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/GuiMode.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui;
import com.google.classyshark.gui.panel.ClassySharkPanel;
import com.google.classyshark.gui.theme.Theme;
import com.google.classyshark.gui.theme.ThemeManager;
import com.google.classyshark.updater.UpdateManager;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.WindowConstants;
import java.io.File;
import java.util.List;
/**
* GUI mode
*/
public class GuiMode {
private static Theme theme = ThemeManager.getCurrentTheme();
private GuiMode() {
}
public static void with(final List<String> argsAsArray) {
UpdateManager.getInstance().checkVersionGui();
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
buildAndShowClassyShark(argsAsArray);
}
});
}
public static Theme getTheme(){
return theme;
}
private static void buildAndShowClassyShark(List<String> cmdLineArgs) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (UnsupportedLookAndFeelException | IllegalAccessException | ClassNotFoundException
| InstantiationException | SecurityException ex) {
ex.printStackTrace();
}
JFrame frame = buildClassySharkFrame(cmdLineArgs);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
theme.applyTo(frame);
}
private static JFrame buildClassySharkFrame(List<String> cmdLineArgs) {
JFrame result = new JFrame("ClassyShark");
theme.applyTo(result);
// no arguments
if (cmdLineArgs.size() == 0) {
result.getContentPane().add(new ClassySharkPanel(result));
return result;
}
// only archive
if (cmdLineArgs.size() == 2) {
result.getContentPane().add(
new ClassySharkPanel(result, new File(cmdLineArgs.get(1))));
return result;
}
// archive and a class file
if (cmdLineArgs.size() == 3) {
result.getContentPane().add(
new ClassySharkPanel(result, new File(cmdLineArgs.get(1)),
cmdLineArgs.get(2)));
return result;
}
return result;
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/ArchiveDisplayer.java
================================================
/*
* Copyright 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel;
import java.io.File;
public interface ArchiveDisplayer {
void displayArchive(File file);
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/ClassySharkPanel.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel;
import com.google.classyshark.gui.GuiMode;
import com.google.classyshark.gui.panel.chart.RingChartPanel;
import com.google.classyshark.gui.panel.displayarea.DisplayArea;
import com.google.classyshark.gui.panel.displayarea.IDisplayArea;
import com.google.classyshark.gui.panel.io.CurrentFolderConfig;
import com.google.classyshark.gui.panel.io.FileChooserUtils;
import com.google.classyshark.gui.panel.io.RecentArchivesConfig;
import com.google.classyshark.gui.panel.methodscount.MethodsCountPanel;
import com.google.classyshark.gui.panel.toolbar.KeyUtils;
import com.google.classyshark.gui.panel.toolbar.Toolbar;
import com.google.classyshark.gui.panel.toolbar.ToolbarController;
import com.google.classyshark.gui.panel.tree.FilesTree;
import com.google.classyshark.gui.settings.SettingsFrame;
import com.google.classyshark.gui.theme.Theme;
import com.google.classyshark.silverghost.SilverGhost;
import com.google.classyshark.silverghost.TokensMapper;
import com.google.classyshark.silverghost.exporter.Exporter;
import com.google.classyshark.silverghost.methodscounter.ClassNode;
import com.google.classyshark.silverghost.translator.Translator;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
import javax.swing.SwingWorker;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.filechooser.FileFilter;
/**
* App controller, general app structure MVM ==> Model - View - Mediator (this class)
*/
public class ClassySharkPanel extends JPanel
implements ToolbarController, ViewerController, KeyListener {
private static final boolean IS_CLASSNAME_FROM_MOUSE_CLICK = true;
private static final boolean VIEW_TOP_CLASS = true;
public static final String ANDROID_MANIFEST_XML_SEARCH = "AndroidManifest.xml - ";
private JFrame parentFrame;
private Toolbar toolbar;
private JSplitPane jSplitPane;
private MethodsCountPanel methodsCountPanel;
private int dividerLocation = 0;
private IDisplayArea displayArea;
private FilesTree filesTree;
private RingChartPanel ringChartPanel;
private boolean isDataLoaded = false;
private final Theme theme = GuiMode.getTheme();
private SilverGhost silverGhost = new SilverGhost();
public ClassySharkPanel(JFrame frame, File archive, String fullClassName) {
this(frame);
silverGhost.setBinaryArchive(archive);
updateUiAfterArchiveReadAndLoadClass(fullClassName);
}
public ClassySharkPanel(JFrame frame, File archive) {
this(frame);
silverGhost.setBinaryArchive(archive);
displayArchive(silverGhost.getBinaryArchive());
}
public ClassySharkPanel(JFrame frame) {
super(false);
buildUI();
parentFrame = frame;
toolbar.setText("");
theme.applyTo(this);
}
@Override
public void onSelectedTypeClassFromMouseClick(String selectedClass) {
for (String clazz : silverGhost.getImportsForCurrentClass()) {
if (clazz.contains(selectedClass)) {
onSelectedImportFromMouseClick(clazz);
return;
}
}
for (String clazz : silverGhost.getAllClassNames()) {
if (clazz.contains(selectedClass)) {
onSelectedImportFromMouseClick(clazz);
return;
}
}
}
@Override
public void onSelectedImportFromMouseClick(String className) {
if (silverGhost.getAllClassNames().contains(className)) {
onSelectedClassName(className);
}
}
@Override
public void onSelectedClassName(String className) {
fillDisplayArea(className, VIEW_TOP_CLASS, IS_CLASSNAME_FROM_MOUSE_CLICK);
}
@Override
public void openArchive() {
final JFileChooser fc = new JFileChooser();
fc.setFileFilter(new FileFilter() {
@Override
public boolean accept(File f) {
return FileChooserUtils.acceptFile(f);
}
@Override
public String getDescription() {
return FileChooserUtils.getFileChooserDescription();
}
});
fc.setCurrentDirectory(CurrentFolderConfig.INSTANCE.getCurrentDirectory());
int returnVal = fc.showOpenDialog(this);
toolbar.setText("");
if (returnVal == JFileChooser.APPROVE_OPTION) {
File resultFile = fc.getSelectedFile();
CurrentFolderConfig.INSTANCE.setCurrentDirectory(fc.getCurrentDirectory());
RecentArchivesConfig.INSTANCE.addArchive(resultFile.getName(),
fc.getCurrentDirectory());
displayArchive(resultFile);
}
}
@Override
public void onGoBackPressed() {
toolbar.setText("");
displayArea.displayClassNames(silverGhost.getAllClassNames(), "");
silverGhost.initClassNameFiltering();
}
@Override
public void onViewTopClassPressed() {
final String textFromTypingArea = toolbar.getText();
fillDisplayArea(textFromTypingArea, VIEW_TOP_CLASS,
!IS_CLASSNAME_FROM_MOUSE_CLICK);
}
@Override
public void onChangedTextFromTypingArea(String selectedLine) {
fillDisplayArea(selectedLine, !VIEW_TOP_CLASS, !IS_CLASSNAME_FROM_MOUSE_CLICK);
}
@Override
public void onMappingsButtonPressed() {
final JFileChooser fc = new JFileChooser();
fc.setFileFilter(new FileFilter() {
@Override
public boolean accept(File f) {
return true;
}
@Override
public String getDescription() {
return "";
}
});
fc.setCurrentDirectory(CurrentFolderConfig.INSTANCE.getCurrentDirectory());
int returnVal = fc.showOpenDialog(this);
toolbar.setText("");
if (returnVal == JFileChooser.APPROVE_OPTION) {
File resultFile = fc.getSelectedFile();
readMappingFile(resultFile);
}
}
@Override
public void onExportButtonPressed() {
SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
Exporter.writeCurrentClass(silverGhost.getCurrentClassName(),
silverGhost.getCurrentClassContent());
Exporter.writeArchive(silverGhost.getBinaryArchive(),
silverGhost.getAllClassNames());
return null;
}
protected void done() {
}
};
worker.execute();
}
@Override
public void onChangeLeftPaneVisibility(boolean visible) {
if (visible) {
jSplitPane.setDividerLocation(dividerLocation);
} else {
dividerLocation = jSplitPane.getDividerLocation();
}
jSplitPane.getLeftComponent().setVisible(visible);
jSplitPane.updateUI();
}
@Override
public void onSettingsButtonPressed() {
SettingsFrame frame = new SettingsFrame();
}
@Override
public void displayArchive(File binaryArchive) {
silverGhost.setBinaryArchive(binaryArchive);
if (parentFrame != null) {
parentFrame.setTitle(silverGhost.getBinaryArchive().getName());
}
readArchiveAndFillDisplayArea(null);
toolbar.activateNavigationButtons();
filesTree.setVisibleRoot();
methodsCountPanel.loadFile(silverGhost.getBinaryArchive());
}
@Override
public void onSelectedMethodCount(ClassNode rootNode) {
ringChartPanel.setRootNode(rootNode);
}
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (!isDataLoaded) {
openArchive();
return;
}
if (KeyUtils.isLeftArrowPressed(e)) {
openArchive();
return;
}
final String textFromTypingArea =
processKeyPressWithTypedText(e, toolbar.getText());
final boolean isViewTopClassKeyPressed = KeyUtils.isRightArrowPressed(e)
|| KeyUtils.isCommandKeyPressed(e);
fillDisplayArea(textFromTypingArea, isViewTopClassKeyPressed,
!ClassySharkPanel.IS_CLASSNAME_FROM_MOUSE_CLICK);
}
private static String processKeyPressWithTypedText(KeyEvent e, String text) {
String result = text;
if (KeyUtils.isDeletePressed(e)) {
if (!text.isEmpty()) {
result = text.substring(0, text.length() - 1);
return result;
}
}
if (KeyUtils.isLetterOrDigit(e)) {
result += e.getKeyChar();
}
return result;
}
@Override
public void keyReleased(KeyEvent e) {
}
private void buildUI() {
BorderLayout borderLayout = new BorderLayout();
setLayout(borderLayout);
ringChartPanel = new RingChartPanel(this);
toolbar = new Toolbar(this);
add(toolbar, BorderLayout.NORTH);
toolbar.addKeyListenerToTypingArea(this);
displayArea = new DisplayArea(this);
final JScrollPane rightScrollPane = new JScrollPane(displayArea.onAddComponentToPane());
theme.applyTo(rightScrollPane);
filesTree = new FilesTree(this);
JTabbedPane jTabbedPane = new JTabbedPane();
JScrollPane leftScrollPane = new JScrollPane(filesTree.getJTree());
theme.applyTo(leftScrollPane);
jTabbedPane.addTab("Classes", leftScrollPane);
methodsCountPanel = new MethodsCountPanel(this);
jTabbedPane.addTab("Methods count", methodsCountPanel);
theme.applyTo(jTabbedPane);
jTabbedPane.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
int dividerLocation1 = jSplitPane.getDividerLocation();
JTabbedPane jTabbedPane1 = (JTabbedPane) e.getSource();
if (jTabbedPane1.getSelectedIndex() == 0) {
jSplitPane.setRightComponent(rightScrollPane);
} else {
jSplitPane.setRightComponent(ringChartPanel);
}
jSplitPane.setDividerLocation(dividerLocation1);
}
});
jSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
jSplitPane.setDividerSize(3);
jSplitPane.setPreferredSize(new Dimension(1000, 700));
jSplitPane.add(jTabbedPane, JSplitPane.LEFT);
jSplitPane.add(rightScrollPane, JSplitPane.RIGHT);
jSplitPane.getLeftComponent().setVisible(true);
jSplitPane.setDividerLocation(300);
theme.applyTo(jSplitPane);
add(jSplitPane, BorderLayout.CENTER);
}
private void updateUiAfterArchiveReadAndLoadClass(String className) {
if (parentFrame != null) {
parentFrame.setTitle(silverGhost.getBinaryArchive().getName());
}
readArchiveAndFillDisplayArea(className);
toolbar.activateNavigationButtons();
filesTree.setVisibleRoot();
methodsCountPanel.loadFile(silverGhost.getBinaryArchive());
}
private void readArchiveAndFillDisplayArea(final String className) {
SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
silverGhost.readContents();
return null;
}
@Override
protected void done() {
if (silverGhost.isArchiveError()) {
filesTree.fillArchive(new File("ERROR"), new ArrayList<String>(),
silverGhost.getComponents());
displayArea.displayError();
return;
}
filesTree.fillArchive(silverGhost.getBinaryArchive(),
silverGhost.getAllClassNames(),
silverGhost.getComponents());
if (className != null) {
onSelectedClassName(className);
} else {
displayArea.displaySharkey();
}
isDataLoaded = true;
}
};
worker.execute();
}
private void readMappingFile(final File resultFile) {
SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
private TokensMapper reverseMappings;
@Override
protected Void doInBackground() throws Exception {
reverseMappings = silverGhost.readMappingFile(resultFile);
return null;
}
protected void done() {
silverGhost.addMappings(reverseMappings);
}
};
worker.execute();
}
private void fillDisplayArea(final String textFromTypingArea,
final boolean viewTopClass,
final boolean viewMouseClickedClass) {
toolbar.setTypingAreaCaret();
SwingWorker<Void, Void> worker = new SwingWorker<Void, Void>() {
private List<Translator.ELEMENT> displayedClassTokens = new ArrayList<>();
private List<Translator.ELEMENT> manifestSearchResultsTokens = new ArrayList<>() ;
private List<String> filteredClassNames = new ArrayList<>();
private String className = "";
@Override
protected Void doInBackground() throws Exception {
if (viewMouseClickedClass) {
className = textFromTypingArea;
convertToManifestIfNeeded();
silverGhost.translateArchiveElement(className);
displayedClassTokens = silverGhost.getArchiveElementTokens();
} else if (viewTopClass) {
className = silverGhost.getAutoCompleteClassName();
silverGhost.translateArchiveElement(className);
displayedClassTokens = silverGhost.getArchiveElementTokens();
} else {
className = textFromTypingArea;
convertToManifestIfNeeded();
filteredClassNames = silverGhost.filter(className);
manifestSearchResultsTokens = silverGhost.getManifestMatches(textFromTypingArea);
checkIfOneClassAndPrepareTokens();
}
return null;
}
@Override
protected void done() {
if(className.isEmpty()) return;
if (isUserClickedOnSearchResult()) {
if (clickedOnClass()) {
toolbar.setText(className);
displayArea.displayClass(displayedClassTokens, textFromTypingArea);
} else {
toolbar.setText("AndroidManifest.xml");
displayManifestWithSpecificLine();
}
} else {
if (noResults()) {
displayArea.displayError();
} else if (oneResult()) {
displayArea.displayClass(displayedClassTokens, "");
} else {
displayArea.displaySearchResults(filteredClassNames,
manifestSearchResultsTokens,
textFromTypingArea);
}
}
}
private boolean isUserClickedOnSearchResult() {
return viewTopClass || viewMouseClickedClass;
}
private boolean clickedOnClass() {
return !displayedClassTokens.isEmpty();
}
private void displayManifestWithSpecificLine() {
silverGhost.translateArchiveElement("AndroidManifest.xml");
displayedClassTokens = silverGhost.getArchiveElementTokens();
displayArea.displayClass(displayedClassTokens, className);
}
private void checkIfOneClassAndPrepareTokens() {
if (oneResult()) {
String topClassName = filteredClassNames.get(0);
silverGhost.translateArchiveElement(topClassName);
displayedClassTokens = silverGhost.getArchiveElementTokens();
}
}
private boolean noResults() {
return ((filteredClassNames.size() == 0) && (manifestSearchResultsTokens.size() == 0));
}
private boolean oneResult() {
return filteredClassNames.size() == 1;
}
private void convertToManifestIfNeeded() {
if (textFromTypingArea.startsWith(ANDROID_MANIFEST_XML_SEARCH)) {
className = "AndroidManifest.xml";
}
}
};
worker.execute();
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/FileTransferHandler.java
================================================
/*
* Copyright 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel;
import com.google.classyshark.gui.panel.io.CurrentFolderConfig;
import com.google.classyshark.gui.panel.io.RecentArchivesConfig;
import javax.swing.JComponent;
import javax.swing.TransferHandler;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.File;
import java.io.IOException;
import java.util.List;
import static com.google.classyshark.gui.panel.io.FileChooserUtils.isSupportedArchiveFile;
public class FileTransferHandler extends TransferHandler {
private final ArchiveDisplayer archiveDisplayer;
public FileTransferHandler(ArchiveDisplayer archiveDisplayer) {
this.archiveDisplayer = archiveDisplayer;
}
public int getSourceActions(JComponent c) {
return COPY_OR_MOVE;
}
public boolean canImport(TransferSupport ts) {
return ts.isDataFlavorSupported(DataFlavor.javaFileListFlavor);
}
public boolean importData(TransferSupport ts) {
try {
@SuppressWarnings("rawtypes")
List data = (List) ts.getTransferable().getTransferData(
DataFlavor.javaFileListFlavor);
if (data.size() < 1) {
return false;
}
for (Object item : data) {
File file = (File) item;
if(isSupportedArchiveFile(file)) {
CurrentFolderConfig.INSTANCE.setCurrentDirectory(file.getParentFile());
RecentArchivesConfig.INSTANCE.addArchive(file.getName(),
file.getParentFile());
archiveDisplayer.displayArchive(file);
}
}
return true;
} catch (UnsupportedFlavorException e) {
return false;
} catch (IOException e) {
return false;
}
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/ViewerController.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel;
import com.google.classyshark.silverghost.methodscounter.ClassNode;
public interface ViewerController extends ArchiveDisplayer {
void onSelectedClassName(String className);
void onSelectedImportFromMouseClick(String classNameFromImportStatement);
void onSelectedTypeClassFromMouseClick(String word);
void onSelectedMethodCount(ClassNode rootNode);
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/chart/RingChart.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.chart;
import com.google.classyshark.gui.GuiMode;
import com.google.classyshark.silverghost.methodscounter.ClassNode;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class RingChart {
private static final int MARGIN = 20;
private static final int DEFAULT_MAX_DEPTH = 2;
private Color OTHERS_COLOR = Color.GRAY;
private static final Color[] PALETTE = new Color[]{
new Color(0x5DA5DA),
new Color(0xFAA43A),
new Color(0x60BD68),
new Color(0xF17CB0),
new Color(0xB2912F),
new Color(0xB276B2),
new Color(0xDECF3F),
new Color(0xF15854),
new Color(0x4D4D4D)};
private static final Color[][] L2_PALLETES = new Color[][] {
{
new Color(0x5dc1d9),
new Color(0x5db8d9),
new Color(0x5dafd9),
new Color(0x5da5d9),
new Color(0x5d9cd9),
new Color(0x5d93d9),
new Color(0x5d89d9)
},
{
new Color(0xfa7839),
new Color(0xfa8639),
new Color(0xfa9539),
new Color(0xfaa339),
new Color(0xfab239),
new Color(0xfac039),
new Color(0xfacf39)
},
{
new Color(0x6dbd60),
new Color(0x66bd60),
new Color(0x60bd61),
new Color(0x60bd68),
new Color(0x60bd6f),
new Color(0x60bd76),
new Color(0x60bd7d)
},
{
new Color(0xf27ccc),
new Color(0xf27cc3),
new Color(0xf27cba),
new Color(0xf27cb1),
new Color(0xf27ca8),
new Color(0xf27c9f),
new Color(0xf27c96)
},
{
new Color(0xb3742e),
new Color(0xb37e2e),
new Color(0xb3882e),
new Color(0xb3912e),
new Color(0xb39b2e),
new Color(0xb3a52e),
new Color(0xb3af2e)
},
{
new Color(0xa576b3),
new Color(0xa976b3),
new Color(0xae76b3),
new Color(0xb376b3),
new Color(0xb376ae),
new Color(0xb376a9),
new Color(0xb376a5)
},
{
new Color(0xdeaa3e),
new Color(0xdeb63e),
new Color(0xdec23e),
new Color(0xdece3e),
new Color(0xdeda3e),
new Color(0xd6de3e),
new Color(0xcade3e)
},
{
new Color(0xf25573),
new Color(0xf25567),
new Color(0xf2555b),
new Color(0xf25a55),
new Color(0xf26655),
new Color(0xf27255),
new Color(0xf27d55)
},
{
new Color(0x5C5C5C),
new Color(0x666666),
new Color(0x707070),
new Color(0x7A7A7A),
new Color(0x858585),
new Color(0x8F8F8F),
new Color(0x999999)
}
};
private int maxDepth;
private Map<Integer, ClassNode> colorClassNodeMap = new HashMap<>();
private BufferedImage image;
private ClassNode selectedNode;
public RingChart() {
this(DEFAULT_MAX_DEPTH);
}
public RingChart(int maxDepth) {
this.maxDepth = maxDepth;
}
public void setSelectedNode(ClassNode selectedNode) {
this.selectedNode = selectedNode;
}
public ClassNode getSelectedNode() {
return selectedNode;
}
public void render(int width, int height, ClassNode rootNode, Graphics g) {
image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Graphics2D imageG2d = (Graphics2D)image.getGraphics();
imageG2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
imageG2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
imageG2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
imageG2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
imageG2d.setComposite(AlphaComposite.Src);
imageG2d.setColor(GuiMode.getTheme().getBackgroundColor());
imageG2d.fillRect(0, 0, width, height);
int graphWidth = width - MARGIN * 2;
int graphHeight = height - MARGIN * 2;
imageG2d.translate(MARGIN, MARGIN);
int size = Math.min(graphWidth, graphHeight);
renderNode(graphWidth, graphHeight, size, 0, 360, rootNode, imageG2d, 1, PALETTE);
imageG2d.dispose();
g.drawImage(image, 0, 0, null);
g.dispose();
}
public ClassNode getClassNodeAt(int x, int y) {
if (image == null) {
return null;
}
int color = image.getRGB(x,y);
return colorClassNodeMap.get(color);
}
private void renderNode(int width, int height, int radius, int startAngle, int endAngle,
ClassNode rootNode, Graphics2D g2d, int depth, Color[] pallete) {
if (rootNode.getChildNodes().isEmpty()) {
return;
}
int nodeStartAngle;
int nodeEndAngle = startAngle;
int angleSize = endAngle - startAngle;
int r = (radius / maxDepth) * depth;
int x = (width - r) / 2;
int y = (height - r) / 2;
int currentNode = 0;
int currentColor = 0;
List<ClassNode> nodes = new ArrayList<>(rootNode.getChildNodes().values());
Collections.sort(nodes, new Comparator<ClassNode>() {
@Override
public int compare(ClassNode o1, ClassNode o2) {
return Integer.compare(o2.getMethodCount(), o1.getMethodCount());
}
});
while (nodeEndAngle < endAngle) {
ClassNode node = nodes.get(currentNode);
nodeStartAngle = nodeEndAngle;
String title = node.getKey();
Color color = pallete[currentColor];
nodeEndAngle = (int) ((double) node.getMethodCount()
/ rootNode.getMethodCount() * angleSize + nodeEndAngle);
if (currentNode == nodes.size() - 1) {
nodeEndAngle = endAngle;
} else if (currentColor == pallete.length - 1 || 360 - nodeEndAngle < 5) {
currentColor = pallete.length - 1;
nodeEndAngle = endAngle;
title = "Others";
color = OTHERS_COLOR;
}
if (selectedNode != null && node == selectedNode) {
color = getHighlightColor(color);
}
if (color != OTHERS_COLOR) {
colorClassNodeMap.put(color.getRGB(), node);
}
if (depth < maxDepth && currentColor != pallete.length - 1) {
Color[] newpallete = L2_PALLETES[currentColor];
renderNode(
width, height, radius, nodeStartAngle, nodeEndAngle, node, g2d, depth + 1, newpallete);
}
g2d.setColor(color);
g2d.fillArc(x, y, r, r, nodeStartAngle, nodeEndAngle - nodeStartAngle);
g2d.setColor(Color.BLACK);
g2d.drawArc(x, y, r, r, nodeStartAngle, nodeEndAngle - nodeStartAngle);
//Render Lines between angles
AffineTransform saved = g2d.getTransform();
int cx = width / 2;
int cy = height / 2;
g2d.translate(cx, cy);
double rads = Math.toRadians(nodeEndAngle);
int py = (int)Math.round(Math.sin(rads) * (r / 2)) * -1;
int px = (int)Math.round(Math.cos(rads) * (r / 2));
g2d.drawLine(0, 0, px, py);
//Render text
int r2 = (radius / maxDepth) * (depth - 1);
r2 = r + (r2 - r)/2;
rads = Math.toRadians(nodeStartAngle + (nodeEndAngle - nodeStartAngle) / 2);
py = (int)Math.round(Math.sin(rads) * (r2 / 2))* -1;
px = (int)Math.round(Math.cos(rads) * (r2 / 2));
g2d.drawString(title, px, py);
g2d.setTransform(saved);
currentNode++;
currentColor++;
}
}
private Color getHighlightColor(Color color) {
float hsbVals[] = Color.RGBtoHSB(
color.getRed(), color.getGreen(), color.getBlue(), null);
return Color.getHSBColor(hsbVals[0], hsbVals[1] * 0.7f, hsbVals[2]);
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/chart/RingChartPanel.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.chart;
import com.google.classyshark.gui.GuiMode;
import com.google.classyshark.gui.panel.FileTransferHandler;
import com.google.classyshark.gui.panel.ViewerController;
import com.google.classyshark.silverghost.methodscounter.ClassNode;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
public class RingChartPanel extends JPanel {
private RingChart ringChart = new RingChart();
private ClassNode rootNode;
public RingChartPanel(final ViewerController viewerController) {
super();
ToolTipManager.sharedInstance().registerComponent(this);
GuiMode.getTheme().applyTo(this);
this.addMouseMotionListener(new MouseMotionListener() {
@Override
public void mouseDragged(MouseEvent e) {
}
@Override
public void mouseMoved(MouseEvent e) {
ClassNode prevSelectedNode = ringChart.getSelectedNode();
ClassNode currSelectedNode = ringChart.getClassNodeAt(e.getX(), e.getY());
if (currSelectedNode == null && prevSelectedNode == null) {
return;
}
if (currSelectedNode == null || !currSelectedNode.equals(prevSelectedNode)) {
ringChart.setSelectedNode(currSelectedNode);
repaint();
}
}
});
this.addMouseListener(new MouseListener() {
@Override
public void mouseClicked(MouseEvent e) {
ClassNode classNode = ringChart.getClassNodeAt(e.getX(), e.getY());
if (classNode == null) {
return;
}
if (classNode.getChildNodes() != null && !classNode.getChildNodes().isEmpty()) {
viewerController.onSelectedMethodCount(classNode);
}
}
@Override
public void mousePressed(MouseEvent e) {
}
@Override
public void mouseReleased(MouseEvent e) {
}
@Override
public void mouseEntered(MouseEvent e) {
}
@Override
public void mouseExited(MouseEvent e) {
}
});
setTransferHandler(new FileTransferHandler(viewerController));
}
@Override
public String getToolTipText(MouseEvent e) {
int x = e.getX();
int y = e.getY();
ClassNode classNode = ringChart.getClassNodeAt(x, y);
if (classNode == null) return null;
return classNode.getKey() + ": " + classNode.getMethodCount();
}
public void setRootNode(ClassNode rootNode) {
this.rootNode = rootNode;
repaint();
}
@Override
public void paint(Graphics g) {
if (rootNode != null) {
ringChart.render(getWidth(), getHeight(), rootNode, g);
}
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/BatchDocument.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.displayarea;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultStyledDocument;
import javax.swing.text.Element;
import java.util.ArrayList;
class BatchDocument extends DefaultStyledDocument {
private static final char[] EOL_ARRAY = { '\n' };
private ArrayList batch = null;
public BatchDocument() {
batch = new ArrayList();
}
public void appendBatchStringNoLineFeed(String str,
AttributeSet a) {
a = a.copyAttributes();
char[] chars = str.toCharArray();
batch.add(new ElementSpec(
a, ElementSpec.ContentType, chars, 0, str.length()));
}
public void appendBatchLineFeed(AttributeSet a) {
batch.add(new ElementSpec(
a, ElementSpec.ContentType, EOL_ARRAY, 0, 1));
Element paragraph = getParagraphElement(0);
AttributeSet pattern = paragraph.getAttributes();
batch.add(new ElementSpec(null, ElementSpec.EndTagType));
batch.add(new ElementSpec(pattern, ElementSpec.StartTagType));
}
public void processBatchUpdates(int offs) throws
BadLocationException {
ElementSpec[] inserts = new ElementSpec[batch.size()];
batch.toArray(inserts);
super.insert(offs, inserts);
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/DisplayArea.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.displayarea;
import com.google.classyshark.gui.GuiMode;
import com.google.classyshark.gui.panel.FileTransferHandler;
import com.google.classyshark.gui.panel.ViewerController;
import com.google.classyshark.gui.panel.displayarea.doodles.Doodle;
import com.google.classyshark.gui.theme.Theme;
import com.google.classyshark.silverghost.translator.Translator;
import com.google.classyshark.silverghost.translator.java.JavaTranslator;
import java.awt.Color;
import java.awt.Component;
import java.awt.Toolkit;
import java.awt.datatransfer.StringSelection;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.List;
import java.util.StringTokenizer;
import javax.swing.JFrame;
import javax.swing.JTextPane;
import javax.swing.WindowConstants;
import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultStyledDocument;
import javax.swing.text.Document;
import javax.swing.text.Style;
import javax.swing.text.StyleConstants;
import javax.swing.text.Utilities;
/**
* the area to display lists of classes and individual class
*/
public class DisplayArea implements IDisplayArea {
private enum DisplayDataState {
SHARKEY, CLASSES_LIST, INSIDE_CLASS, ERROR
}
private final JTextPane jTextPane;
private Style style;
private final Theme theme = GuiMode.getTheme();
private DisplayDataState displayDataState;
public DisplayArea(final ViewerController viewerController) {
jTextPane = new JTextPane();
theme.applyTo(jTextPane);
jTextPane.setDragEnabled(true);
jTextPane.setTransferHandler(new FileTransferHandler(viewerController));
jTextPane.setEditable(false);
jTextPane.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (displayDataState == DisplayDataState.SHARKEY) {
return;
}
if (e.getButton() != MouseEvent.BUTTON1) {
return;
}
if (e.getClickCount() != 2) {
return;
}
int offset = jTextPane.viewToModel(e.getPoint());
try {
int rowStart = Utilities.getRowStart(jTextPane, offset);
int rowEnd = Utilities.getRowEnd(jTextPane, offset);
String selectedLine = jTextPane.getText().substring(rowStart, rowEnd);
System.out.println(selectedLine);
if (displayDataState == DisplayDataState.CLASSES_LIST || selectedLine.endsWith(".dex")) {
viewerController.onSelectedClassName(selectedLine);
} else if (displayDataState == DisplayDataState.INSIDE_CLASS) {
if (selectedLine.contains("import")) {
viewerController.onSelectedImportFromMouseClick(
getClassNameFromImportStatement(selectedLine));
} else {
rowStart = Utilities.getWordStart(jTextPane, offset);
rowEnd = Utilities.getWordEnd(jTextPane, offset);
String word = jTextPane.getText().substring(rowStart, rowEnd);
viewerController.onSelectedTypeClassFromMouseClick(word);
}
}
} catch (BadLocationException e1) {
e1.printStackTrace();
}
}
public String getClassNameFromImportStatement(String selectedLine) {
final String IMPORT = "import ";
int start = selectedLine.indexOf(IMPORT) + IMPORT.length();
String result = selectedLine.trim().substring(start,
selectedLine.indexOf(";"));
return result;
}
});
jTextPane.addKeyListener(new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
Toolkit toolkit = Toolkit.getDefaultToolkit();
int ctrlModifier = toolkit.getMenuShortcutKeyMask();
//check if the modifier: ctrl for linux, windows or command for mac is pressed
// with the'c' key
if (e.getKeyChar() == 'c' &&
(e.getModifiers() & ctrlModifier) == ctrlModifier) {
String copyText = jTextPane.getSelectedText();
//if there is no selection, copy the entire text
if (copyText == null) {
copyText = jTextPane.getText();
}
//Add the text to the clipboard
toolkit.getSystemClipboard().setContents(new StringSelection(copyText), null);
}
}
@Override
public void keyReleased(KeyEvent e) {
}
});
displaySharkey();
}
@Override
public Component onAddComponentToPane() {
return this.jTextPane;
}
@Override
public void displaySearchResults(List<String> filteredClassNames,
List<Translator.ELEMENT> displayedManifestSearchResultsTokens,
String textFromTypingArea) {
displayDataState = DisplayDataState.CLASSES_LIST;
StyleConstants.setFontSize(style, 20);
StyleConstants.setForeground(style, theme.getIdentifiersColor());
clearText();
Document doc = new DefaultStyledDocument();
jTextPane.setDocument(doc);
StyleConstants.setFontSize(style, 20);
StyleConstants.setBackground(style, theme.getBackgroundColor());
fillTokensToDoc(displayedManifestSearchResultsTokens, doc, true);
StyleConstants.setFontSize(style, 20);
StyleConstants.setForeground(style, theme.getIdentifiersColor());
StyleConstants.setBackground(style, theme.getBackgroundColor());
int displayedClassLimit = 50;
if(filteredClassNames.size() < displayedClassLimit) {
displayedClassLimit = filteredClassNames.size();
}
for (int i = 0; i < displayedClassLimit; i++) {
try {
doc.insertString(doc.getLength(), filteredClassNames.get(i) + "\n", style);
} catch (BadLocationException e) {
e.printStackTrace();
}
}
jTextPane.setDocument(doc);
jTextPane.setCaretPosition(1);
}
@Override
public void displayClassNames(List<String> classNamesToShow,
String inputText) {
StyleConstants.setFontSize(style, 20);
StyleConstants.setForeground(style, theme.getIdentifiersColor());
StyleConstants.setBackground(style, theme.getBackgroundColor());
if (classNamesToShow.size() > 50) {
displayAllClassesNames(classNamesToShow);
return;
}
displayDataState = DisplayDataState.CLASSES_LIST;
clearText();
int matchIndex;
String beforeMatch = "";
String match;
String afterMatch = "";
Document doc = jTextPane.getDocument();
for (String className : classNamesToShow) {
matchIndex = className.indexOf(inputText);
if (matchIndex > -1) {
beforeMatch = className.substring(0, matchIndex);
match = className.substring(matchIndex, matchIndex + inputText.length());
afterMatch = className.substring(matchIndex + inputText.length(),
className.length());
} else {
// we are here by camel match
// i.e. 2-3 letters that fits
// to class name
match = className;
}
try {
doc.insertString(doc.getLength(), beforeMatch, style);
StyleConstants.setBackground(style, theme.getSelectionBgColor());
doc.insertString(doc.getLength(), match, style);
StyleConstants.setBackground(style, theme.getBackgroundColor());
doc.insertString(doc.getLength(), afterMatch + "\n", style);
} catch (BadLocationException e) {
e.printStackTrace();
}
}
jTextPane.setDocument(doc);
}
private void displayAllClassesNames(List<String> classNames) {
long start = System.currentTimeMillis();
displayDataState = DisplayDataState.CLASSES_LIST;
StyleConstants.setFontSize(style, 20);
StyleConstants.setForeground(style, theme.getIdentifiersColor());
clearText();
BatchDocument blank = new BatchDocument();
jTextPane.setDocument(blank);
for (String className : classNames) {
blank.appendBatchStringNoLineFeed(className, style);
blank.appendBatchLineFeed(style);
}
try {
blank.processBatchUpdates(0);
} catch (BadLocationException e) {
e.printStackTrace();
}
jTextPane.setDocument(blank);
System.out.println("UI update " + (System.currentTimeMillis() - start) + " ms");
}
@Override
public void displayClass(String classString) {
displayDataState = DisplayDataState.INSIDE_CLASS;
try {
String currentText =
jTextPane.getDocument().getText(0, jTextPane.getDocument().getLength());
if (currentText.equals(getOneColorFormattedOutput(classString))) {
return;
}
} catch (BadLocationException e) {
e.printStackTrace();
}
clearText();
StyleConstants.setFontSize(style, 20);
Document doc = new DefaultStyledDocument();
try {
doc.insertString(doc.getLength(), getOneColorFormattedOutput(classString), style);
} catch (BadLocationException e) {
e.printStackTrace();
}
jTextPane.setDocument(doc);
jTextPane.setCaretPosition(1);
}
// TODO add here logic fo highlighter
// TODO by adding flag to Translator.ELEMENT
@Override
public void displayClass(List<Translator.ELEMENT> elements, String key) {
displayDataState = DisplayDataState.INSIDE_CLASS;
clearText();
StyleConstants.setFontSize(style, 20);
StyleConstants.setBackground(style, theme.getBackgroundColor());
Document doc = new DefaultStyledDocument();
fillTokensToDoc(elements, doc, false);
StyleConstants.setForeground(style, theme.getIdentifiersColor());
jTextPane.setDocument(doc);
int i = calcScrollingPosition(key);
jTextPane.setCaretPosition(i);
}
private void fillTokensToDoc(List<Translator.ELEMENT> from, Document to, boolean newLine) {
try {
for (Translator.ELEMENT e : from) {
switch (e.tag) {
case MODIFIER:
StyleConstants.setForeground(style, theme.getKeyWordsColor());
break;
case DOCUMENT:
StyleConstants.setForeground(style, theme.getDefaultColor());
break;
case IDENTIFIER:
StyleConstants.setForeground(style, theme.getIdentifiersColor());
break;
case ANNOTATION:
StyleConstants.setForeground(style, theme.getAnnotationsColor());
break;
case XML_TAG:
StyleConstants.setForeground(style, theme.getIdentifiersColor());
break;
case XML_ATTR_NAME:
StyleConstants.setForeground(style, theme.getKeyWordsColor());
break;
case XML_ATTR_VALUE:
StyleConstants.setForeground(style, theme.getDefaultColor());
break;
case SELECTION:
StyleConstants.setForeground(style, theme.getSelectionBgColor());
break;
default:
StyleConstants.setForeground(style, Color.LIGHT_GRAY);
}
String text = e.text;
if(newLine) {
text += "\n";
}
to.insertString(to.getLength(), text, style);
}
} catch (BadLocationException e) {
e.printStackTrace();
}
}
private int calcScrollingPosition(String textToFind) {
int pos = 0;
boolean found = false;
textToFind = textToFind.trim();
if (textToFind != null && textToFind.length() > 0) {
Document document = jTextPane.getDocument();
int findLength = textToFind.length();
try {
// Rest the search position if we're at the end of the document
if (pos + findLength > document.getLength()) {
pos = 0;
}
// While we haven't reached the end... "<=" Correction
while (pos + findLength <= document.getLength()) {
String match = document.getText(pos, findLength).toLowerCase();
if (match.equalsIgnoreCase(textToFind)) {
found = true;
break;
}
pos++;
}
} catch (Exception exp) {
exp.printStackTrace();
}
}
if(found) {
return pos;
} else {
return 1;
}
}
@Override
public void displaySharkey() {
displayDataState = DisplayDataState.SHARKEY;
clearText();
style = jTextPane.addStyle("STYLE", null);
Document doc = jTextPane.getStyledDocument();
try {
StyleConstants.setForeground(style, theme.getIdentifiersColor());
StyleConstants.setFontSize(style, 15);
StyleConstants.setFontFamily(style, "Monospaced");
doc.insertString(doc.getLength(), Doodle.get(), style);
} catch (BadLocationException e) {
e.printStackTrace();
}
jTextPane.setDocument(doc);
}
@Override
public void displayError() {
displayDataState = DisplayDataState.ERROR;
clearText();
style = jTextPane.addStyle("STYLE", null);
Document doc = jTextPane.getStyledDocument();
try {
StyleConstants.setForeground(style, theme.getDefaultColor());
StyleConstants.setFontSize(style, 15);
StyleConstants.setFontFamily(style, "Monospaced");
doc.insertString(doc.getLength(), "\n\n\n\t\t\t There was a problem loading the class ", style);
doc.insertString(doc.getLength(), Doodle.get(), style);
} catch (BadLocationException e) {
e.printStackTrace();
}
jTextPane.setDocument(doc);
}
private void clearText() {
jTextPane.setText(null);
}
private static String getOneColorFormattedOutput(String data) {
return data + "\n";
}
public static void main(String[] args) {
DisplayArea da = new DisplayArea(null);
Translator emitter = new JavaTranslator(StringTokenizer.class);
emitter.apply();
da.displayClass(emitter.getElementsList(), "");
JFrame frame = new JFrame("Test");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.getContentPane().add(da.onAddComponentToPane());
frame.pack();
frame.setVisible(true);
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/IDisplayArea.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.displayarea;
import com.google.classyshark.silverghost.translator.Translator;
import java.awt.Component;
import java.util.List;
public interface IDisplayArea {
Component onAddComponentToPane();
void displayClassNames(List<String> classNamesToShow,
String inputText);
void displayClass(List<Translator.ELEMENT> displayedClassTokens, String classString);
void displayClass(String classString);
void displaySharkey();
void displayError();
void displaySearchResults(List<String> filteredClassNames, List<Translator.ELEMENT> displayedManifestSearchResultsTokens, String textFromTypingArea);
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/ChristmasBG.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.displayarea.doodles;
/**
* the welcome ascii art image
*/
class ChristmasBG {
public static final String SHARKEY =
"\t * ,\n" +
"\t _/^\\_\n" +
"\t < >\n" +
"\t * /.-.\\ *\n" +
"\t * `/&\\` *\n" +
"\t ,@.*;@,\n" +
"\t /_o.I %_\\ *\n" +
"\t * (`'--:o(_@;\n" +
"\t /`;--.,__ `') *\n" +
"\t ;@`o % O,*`'`&\\ \n" +
"\t * (`'--)_@ ;o %'()\\ *\n" +
"\t /`;--._`''--._O'@;\n" +
"\t /&*,()~o`;-.,_ `\"\"`)\n" +
"\t * /`,@ ;+& () o*`;-';\\\n" +
"\t (`\"\"--.,_0 +% @' &()\\\n" +
"\t /-.,_ ``''--....-'`) *\n" +
"\t * /@%;o`:;'--,.__ __.'\\\n" +
"\t ;*,&(); @ % &^;~`\"`o;@(); *\n" +
"\t /(); o^~; & ().o@*&`;&%O\\\n" +
"\t `\"=\"==\"\"==,,,.,=\"==\"===\"`\n" +
"\t __.----.(\\-''#####---...___...-----._\n" +
"\t '` \\)_`\"\"\"\"\"` \n"
+ "\n http://www.angelfire.com/ca/mathcool/christmas.html\n"
+ "\n\n\n\tClassyShark ver. 4.3 Christmas Edition";
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/Doodle.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.displayarea.doodles;
public class Doodle {
public static String get() {
return SharkBG.SHARKEY;
}
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/SanFranBG.java
================================================
/*
* Copyright 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.displayarea.doodles;
public class SanFranBG {
public static final String SHARKEY =
"\n\n\n\n"
+ "\n\n\n\n"
+ "\t ^^\n" +
"\t ^^ .. ..\n" +
"\t [] []\n" +
"\t .:[]:_ ^^ ,:[]:.\n" +
"\t .: :[]: :-. ,-: :[]: :.\n" +
"\t .: : :[]: : :`._ ,.': : :[]: : :.\n" +
"\t .: : : :[]: : : : :-._ _,-: : : : :[]: : : :.\n" +
"\t_..: : : : :[]: : : : : : :-._________.-: : : : : : :[]: : : : :-._\n" +
"\t_:_:_:_:_:_:[]:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:[]:_:_:_:_:_:_\n" +
"\t!!!!!!!!!!!![]!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!![]!!!!!!!!!!!!!\n" +
"\t^^^^^^^^^^^^[]^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[]^^^^^^^^^^^^^\n" +
"\t [] []\n" +
"\t [] []\n" +
"\t [] []\n" +
"\t ~~^-~^_~^~/ \\~^-~^~_~^-~_^~-^~_^~~-^~_~^~-~_~-^~_^/ \\~^-~_~^-~~-\n" +
"\t~ _~~- ~^-^~-^~~- ^~_^-^~~_ -~^_ -~_-~~^- _~~_~-^_ ~^-^~~-_^-~ ~^\n" +
"\t ~ ^- _~~_- ~~ _ ~ ^~ - ~~^ _ - ^~- ~ _ ~~^ - ~_ - ~^_~\n" +
"\t ~- ^_ ~^ - ^~ _ - ~^~ _ _~^~- _ ~~^ - _ ~ - _ ~~^ -\n" +
"\tjgs ~^ -_ ~^^ -_ ~ _ - _ ~^~- _~ -_ ~- _ ~^ _ - ~ ^-\n" +
"\t ~^~ - _ ^ - ~~~ _ - _ ~-^ ~ __- ~_ - ~ ~^_-\n" +
"\t ~ ~- ^~ - ~^ - ~ ^~ - ~~ ^~ - ~"
+ "\n\n\t http://www.ascii-code.com/ascii-art/buildings-and-places/bridges.php"
+ "\n\n\n\tClassyShark ver. 6.0 powered by SilverGhost";
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/SharkBG.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.displayarea.doodles;
import com.google.classyshark.Version;
/**
* the welcome ascii art image
*/
class SharkBG {
public static final String SHARKEY =
"\n\n\n\n"
+ "\n\n\n\n"
+ " _,, ,dW\n"
+ " ,iSMP JIl;\n"
+ " sPT1Y' JWS:'\n"
+ " sIl:l1 fWIl? \n"
+ " dIi:Il; fW1\" \n"
+ " dIi:l:I' fWI: \n"
+ " dIli:l:I; fWI: \n"
+ " .dIli:I:S:S . fWIl` \n"
+ " ,sWSSIIIiISIIS w,_ .sMW ,MWIl; \n"
+ " _.,sWWW*\"'*\" , SWW' MWWMm mu,,._ .iSYISb, ,MM*SI!: \n"
+ " _,s YMMWW'',sd,'MM WMMi \"*MW* WWWMWMb MMS WWP`,MW' S1!` \n"
+ " _,os,'MMi YW' m,'WW; WWb`SWM Im,, SIS ISW SISIP* WSi II!. \n"
+ " .osSMWMW,'WSi ',MMP SSb WSW ISII`SYYi III !Il lIi,ui:,*1:li:l1! \n"
+ " ,sSMMWWWSSSS,'SWbdWW* *YSbiSS:'IlI 7llI il1: l! 'l:+'+l; `''+1i:1i \n"
+ " ,sYSMWMWY**\"\"\"'` 'WWSSIIiu,'**Y11';IIIb ?!li ?l:i, ` `'l!: \n"
+ " sPITMWMW'`.M.wdWWb,'YIi `YT\" ,u!1\",ISIWWm,'+?+ `'+Ili `'l:,\n"
+ " YIi1lTYfPSkyLinedI!i`I!\" .,:!1\"',iSWWMMMMMmm, \n"
+ " \"T1l1lI**\"'`.2006? ',o?*'`` ```\"\"**YSWMMMWMm, \n"
+ " \"*:iil1I!I!\"` ' ``\"*YMMWWM, \n"
+ " ii! '*YMWM, \n"
+ " I' \"YM\n"
+ "\n\n\n\thttp://www.retrojunkie.com/asciiart/animals/sharks.htm"
+ "\n\n\n\tClassyShark ver." + Version.MAJOR + "."
+ Version.MINOR + " powered by SilverGhost";
}
================================================
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/io/CurrentFolderConfig.java
================================================
/*
* Copyright 2015 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.gui.panel.io;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Properties;
/**
* Class that manages ClassyShark config
*/
public enum CurrentFolderConfig {
INSTANCE;
private static final String CLASSYSHARK_PROPERTIES = "classyshark.properties";
private static final String CURRENT_FOLDER = "CURRENT_FOLDER";
public void setCurrentDirectory(File path) {
String curDir = path.getAbsolutePath();
try {
File configFile = new File(CLASSYSHARK_PROPERTIES);
if (!configFile.exists()) {
configFile.createNewFile();
}
Properties props = new Properties();
props.setProperty(CURRENT_FOLDER, curDir);
FileWriter writer = new FileWriter(configFile);
props.store(writer, CURRENT_FOLDER + "wrote");
writer.close();
} catch (Exception ex) {
}
}
public File getCurrentDirectory() {
try {
File configFile = new File(CLASSYSHARK_PROPERTIES);
if (!configFile.exists()) {
configFile.createNewFile();
}
FileReader reader = new FileReader(configFile);
Properties props = new Properties();
props.load(reader);
String result = props.getProperty(CURRENT_FOLDER);
reader.close();
return new File(result);
} catch (Exception ex) {
}
retu
gitextract__6u5jl00/
├── .gitignore
├── CONTRIB.md
├── ClassySharkAndroid/
│ ├── .gitignore
│ ├── ClassySharkAndroid.iml
│ ├── app/
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── google/
│ │ │ └── classysharkandroid/
│ │ │ └── activities/
│ │ │ └── classysharkandroid/
│ │ │ └── ApplicationTest.java
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── assets/
│ │ │ │ ├── prettify.css
│ │ │ │ ├── prettify.js
│ │ │ │ ├── run_prettify.js
│ │ │ │ └── sons-of-obsidian.css
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── google/
│ │ │ │ └── classysharkandroid/
│ │ │ │ ├── activities/
│ │ │ │ │ ├── ClassesListActivity.java
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── SourceViewerActivity.java
│ │ │ │ ├── adapters/
│ │ │ │ │ └── StableArrayAdapter.java
│ │ │ │ ├── dex/
│ │ │ │ │ └── DexLoaderBuilder.java
│ │ │ │ ├── reflector/
│ │ │ │ │ ├── ClassTypeAlgorithm.java
│ │ │ │ │ ├── ClassesNamesList.java
│ │ │ │ │ └── Reflector.java
│ │ │ │ └── utils/
│ │ │ │ ├── IOUtils.java
│ │ │ │ └── UriUtils.java
│ │ │ └── res/
│ │ │ ├── layout/
│ │ │ │ ├── activity_classes_list.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── activity_source_viewer.xml
│ │ │ ├── menu/
│ │ │ │ ├── menu_main.xml
│ │ │ │ └── menu_source_viewer.xml
│ │ │ ├── values/
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── values-w820dp/
│ │ │ └── dimens.xml
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── classysharkandroid/
│ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── settings.gradle
│ └── snap/
│ └── snapcraft.yaml
├── ClassySharkWS/
│ ├── build.gradle
│ ├── gradlew
│ ├── gradlew.bat
│ └── src/
│ ├── META-INF/
│ │ └── MANIFEST.MF
│ └── com/
│ └── google/
│ └── classyshark/
│ ├── Main.java
│ ├── Shark.java
│ ├── Version.java
│ ├── analytics/
│ │ ├── Analytics.java
│ │ ├── FocusPoint.java
│ │ ├── GoogleAnalytics_v1_URLBuildingStrategy.java
│ │ ├── HTTPGetMethod.java
│ │ ├── JGoogleAnalyticsTracker.java
│ │ ├── LoggingAdapter.java
│ │ └── URLBuildingStrategy.java
│ ├── cli/
│ │ └── CliMode.java
│ ├── gui/
│ │ ├── GuiMode.java
│ │ ├── panel/
│ │ │ ├── ArchiveDisplayer.java
│ │ │ ├── ClassySharkPanel.java
│ │ │ ├── FileTransferHandler.java
│ │ │ ├── ViewerController.java
│ │ │ ├── chart/
│ │ │ │ ├── RingChart.java
│ │ │ │ └── RingChartPanel.java
│ │ │ ├── displayarea/
│ │ │ │ ├── BatchDocument.java
│ │ │ │ ├── DisplayArea.java
│ │ │ │ ├── IDisplayArea.java
│ │ │ │ └── doodles/
│ │ │ │ ├── ChristmasBG.java
│ │ │ │ ├── Doodle.java
│ │ │ │ ├── SanFranBG.java
│ │ │ │ └── SharkBG.java
│ │ │ ├── io/
│ │ │ │ ├── CurrentFolderConfig.java
│ │ │ │ ├── FileChooserUtils.java
│ │ │ │ └── RecentArchivesConfig.java
│ │ │ ├── methodscount/
│ │ │ │ └── MethodsCountPanel.java
│ │ │ ├── reducer/
│ │ │ │ └── Reducer.java
│ │ │ ├── toolbar/
│ │ │ │ ├── KeyUtils.java
│ │ │ │ ├── RecentArchivesButton.java
│ │ │ │ ├── Toolbar.java
│ │ │ │ └── ToolbarController.java
│ │ │ └── tree/
│ │ │ ├── CellRenderer.java
│ │ │ ├── FilesTree.java
│ │ │ └── NodeInfo.java
│ │ ├── settings/
│ │ │ ├── SettingsFrame.java
│ │ │ └── ThemeChosenListener.java
│ │ └── theme/
│ │ ├── SwingThemeApplier.java
│ │ ├── Theme.java
│ │ ├── ThemeManager.java
│ │ ├── dark/
│ │ │ ├── DarkColorScheme.java
│ │ │ ├── DarkIconScheme.java
│ │ │ └── DarkTheme.java
│ │ └── light/
│ │ ├── LightColorScheme.java
│ │ ├── LightIconScheme.java
│ │ └── LightTheme.java
│ ├── silverghost/
│ │ ├── FullArchiveReader.java
│ │ ├── SilverGhost.java
│ │ ├── SilverGhostFacade.java
│ │ ├── TokensMapper.java
│ │ ├── contentreader/
│ │ │ ├── BinaryContentReader.java
│ │ │ ├── ContentReader.java
│ │ │ ├── aar/
│ │ │ │ └── AarReader.java
│ │ │ ├── apk/
│ │ │ │ └── ApkReader.java
│ │ │ ├── clazz/
│ │ │ │ ├── ClassNameVisitor.java
│ │ │ │ └── ClazzReader.java
│ │ │ ├── dex/
│ │ │ │ ├── DexReader.java
│ │ │ │ └── DexlibLoader.java
│ │ │ └── jar/
│ │ │ └── JarReader.java
│ │ ├── exporter/
│ │ │ ├── Exporter.java
│ │ │ ├── FlatMethodCountExporter.java
│ │ │ ├── MethodCountExporter.java
│ │ │ └── TreeMethodCountExporter.java
│ │ ├── io/
│ │ │ └── SherlockHash.java
│ │ ├── methodscounter/
│ │ │ ├── ClassInfo.java
│ │ │ ├── ClassNode.java
│ │ │ └── RootBuilder.java
│ │ ├── plugins/
│ │ │ ├── EmptyFullArchiveReader.java
│ │ │ └── IdentityMapper.java
│ │ └── translator/
│ │ ├── Translator.java
│ │ ├── TranslatorFactory.java
│ │ ├── apk/
│ │ │ ├── ApkTranslator.java
│ │ │ └── dashboard/
│ │ │ ├── ApkDashboard.java
│ │ │ ├── ApkNativeMethodsVisitor.java
│ │ │ ├── ClassesDexDataEntry.java
│ │ │ ├── DynamicSymbolsInspector.java
│ │ │ ├── JavaDependenciesInspector.java
│ │ │ ├── PrivateNativeLibsInspector.java
│ │ │ ├── SyntheticAccessorsInspector.java
│ │ │ ├── Table.java
│ │ │ └── manifest/
│ │ │ ├── AndroidManifestPlainTextReader.java
│ │ │ ├── ManifestInspector.java
│ │ │ └── ReceiverActionsBL.java
│ │ ├── dex/
│ │ │ ├── DexInfoTranslator.java
│ │ │ ├── DexMethodsDumper.java
│ │ │ └── DexStringsDumper.java
│ │ ├── elf/
│ │ │ ├── ElfReader.java
│ │ │ └── ElfTranslator.java
│ │ ├── jar/
│ │ │ └── JarInfoTranslator.java
│ │ ├── java/
│ │ │ ├── JavaTranslator.java
│ │ │ ├── MetaObject.java
│ │ │ ├── MetaObjectFactory.java
│ │ │ ├── MetaObjectWithMapper.java
│ │ │ ├── StressTest.java
│ │ │ ├── clazz/
│ │ │ │ ├── QualifiedTypesMap.java
│ │ │ │ ├── asm/
│ │ │ │ │ ├── ClassBytesFromJarExtractor.java
│ │ │ │ │ ├── ClassDetailsFiller.java
│ │ │ │ │ └── MetaObjectAsmClass.java
│ │ │ │ └── reflect/
│ │ │ │ ├── ClassUtils.java
│ │ │ │ └── MetaObjectClass.java
│ │ │ └── dex/
│ │ │ ├── DexlibAdapter.java
│ │ │ ├── MetaObjectDex.java
│ │ │ └── MultidexReader.java
│ │ └── xml/
│ │ ├── AndroidXmlTranslator.java
│ │ ├── XmlDecompressor.java
│ │ └── XmlHighlighter.java
│ └── updater/
│ ├── UpdateManager.java
│ ├── models/
│ │ ├── Release.java
│ │ └── ReleaseDownloadData.java
│ ├── networking/
│ │ ├── AbstractDownloader.java
│ │ ├── AbstractReleaseCallback.java
│ │ ├── CliDownloader.java
│ │ ├── GitHubApi.java
│ │ ├── GuiDownloader.java
│ │ ├── MessageRunnable.java
│ │ └── NetworkManager.java
│ └── utils/
│ ├── FileUtils.java
│ └── NamingUtils.java
├── NOTICE
├── README.md
├── Samples/
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ └── SampleGradle/
│ ├── README.md
│ ├── build.gradle
│ ├── gradlew
│ ├── gradlew.bat
│ └── src/
│ └── main/
│ └── java/
│ └── Main.java
└── third_party/
├── ASMDEX.LICENSE
└── java-binutils.LICENSE
SYMBOL INDEX (997 symbols across 135 files)
FILE: ClassySharkAndroid/app/src/androidTest/java/com/google/classysharkandroid/activities/classysharkandroid/ApplicationTest.java
class ApplicationTest (line 9) | public class ApplicationTest extends ApplicationTestCase<Application> {
method ApplicationTest (line 10) | public ApplicationTest() {
FILE: ClassySharkAndroid/app/src/main/assets/prettify.js
function S (line 2) | function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var...
function T (line 6) | function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.cla...
function H (line 7) | function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}
function U (line 7) | function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g....
function C (line 7) | function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(...
function v (line 9) | function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''...
function J (line 13) | function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.clas...
function p (line 15) | function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(...
function I (line 15) | function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-m...
function K (line 15) | function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
function g (line 27) | function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity...
FILE: ClassySharkAndroid/app/src/main/assets/run_prettify.js
function X (line 2) | function X(e){function j(){try{J.doScroll("left")}catch(e){P(j,50);retur...
function Q (line 3) | function Q(){S&&X(function(){var e=K.length;$(e?function(){for(var j=0;j...
function j (line 5) | function j(m){if(m!==w){var n=x.createElement("link");n.rel="stylesheet"...
function j (line 6) | function j(a){function d(f){var b=f.charCodeAt(0);if(b!==92)return b;var...
function m (line 10) | function m(a,d){function h(a){var c=a.nodeType;if(c==1){if(!b.test(a.cla...
function n (line 11) | function n(a,d,h,b){d&&(a={a:d,e:a},h(a),b.push.apply(b,a.g))}
function x (line 11) | function x(a){for(var d=void 0,h=a.firstChild;h;h=h.nextSibling)var b=h....
function C (line 11) | function C(a,d){function h(a){for(var l=a.e,j=[l,"pln"],c=
function t (line 13) | function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''...
function z (line 17) | function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.clas...
function i (line 19) | function i(a,d){for(var h=d.length;--h>=0;){var b=d[h];U.hasOwnProperty(...
function A (line 19) | function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\s*</.test(d)?"default-m...
function D (line 19) | function D(a){var d=
function e (line 31) | function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity...
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/activities/ClassesListActivity.java
class ClassesListActivity (line 49) | public class ClassesListActivity extends AppCompatActivity {
method onCreate (line 59) | @Override
method setActionBar (line 94) | private void setActionBar() {
method onCreateOptionsMenu (line 106) | @Override
method onOptionsItemSelected (line 112) | @Override
class FillClassesNamesThread (line 123) | private class FillClassesNamesThread extends Thread {
method FillClassesNamesThread (line 126) | public FillClassesNamesThread(byte[] bytes) {
method run (line 130) | @Override
class StartDexLoaderThread (line 178) | private class StartDexLoaderThread extends Thread {
method StartDexLoaderThread (line 181) | public StartDexLoaderThread(byte[] bytes) {
method run (line 185) | @Override
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/activities/MainActivity.java
class MainActivity (line 40) | public class MainActivity extends AppCompatActivity {
method onCreate (line 45) | @Override
method onStart (line 52) | @Override
method onCreateOptionsMenu (line 101) | @Override
method onOptionsItemSelected (line 108) | @Override
method convert (line 123) | private static List<String> convert(ArrayList<AppListNode> apps) {
class AppListNode (line 133) | private static class AppListNode implements Comparable<AppListNode> {
method compareTo (line 138) | @Override
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/activities/SourceViewerActivity.java
class SourceViewerActivity (line 33) | public class SourceViewerActivity extends AppCompatActivity {
method onCreate (line 37) | @Override
method onCreateOptionsMenu (line 78) | @Override
method onOptionsItemSelected (line 84) | @Override
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/adapters/StableArrayAdapter.java
class StableArrayAdapter (line 25) | public class StableArrayAdapter extends ArrayAdapter<String> {
method StableArrayAdapter (line 29) | public StableArrayAdapter(Context context, int textViewResourceId,
method getItemId (line 37) | @Override
method hasStableIds (line 43) | @Override
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/dex/DexLoaderBuilder.java
class DexLoaderBuilder (line 34) | public class DexLoaderBuilder {
method DexLoaderBuilder (line 38) | private DexLoaderBuilder() {
method fromFile (line 42) | public static DexClassLoader fromFile(Context context, final File dexF...
method fromBytes (line 51) | public static DexClassLoader fromBytes(Context context, final byte[] d...
method prepareDex (line 76) | private static boolean prepareDex(byte[] bytes, File dexInternalStorag...
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/ClassTypeAlgorithm.java
class ClassTypeAlgorithm (line 21) | public class ClassTypeAlgorithm {
method ClassTypeAlgorithm (line 22) | private ClassTypeAlgorithm() {
method TypeName (line 25) | public static String TypeName(String nm, Hashtable ht) {
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/ClassesNamesList.java
class ClassesNamesList (line 22) | public class ClassesNamesList {
method ClassesNamesList (line 26) | public ClassesNamesList() {
method add (line 30) | public void add(String className) {
method getClassNames (line 34) | public List<String> getClassNames() {
method getClassName (line 38) | public String getClassName(int position) {
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/Reflector.java
class Reflector (line 22) | public class Reflector {
type TAG (line 27) | public enum TAG {
class TaggedWord (line 31) | public static class TaggedWord {
method TaggedWord (line 33) | public TaggedWord(String word, TAG tag) {
method Reflector (line 42) | public Reflector(Class clazz) {
method toString (line 47) | public String toString() {
method getWords (line 61) | public List<TaggedWord> getWords() {
method generateClassData (line 65) | public void generateClassData() {
method generateDependencies (line 108) | private Hashtable generateDependencies(Constructor[] constructors, Met...
method fillTaggedText (line 144) | private void fillTaggedText(Constructor[] constructors, Method[] metho...
method main (line 251) | public static void main(String[] args) {
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/utils/IOUtils.java
class IOUtils (line 27) | public class IOUtils {
method bytesToFile (line 29) | public static void bytesToFile(byte[] bytes, File result) throws IOExc...
method toByteArray (line 37) | public static byte[] toByteArray(InputStream input) throws IOException {
method copy (line 43) | public static int copy(InputStream input, OutputStream output) throws ...
method copyLarge (line 53) | public static long copyLarge(InputStream input, OutputStream output)
FILE: ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/utils/UriUtils.java
class UriUtils (line 25) | public class UriUtils {
method getStreamFromUri (line 27) | public static InputStream getStreamFromUri(Context context, Uri uriFro...
method isAttach (line 31) | public static boolean isAttach(Uri uriFromIntent) {
FILE: ClassySharkAndroid/app/src/test/java/com/classysharkandroid/ExampleUnitTest.java
class ExampleUnitTest (line 10) | public class ExampleUnitTest {
method addition_isCorrect (line 11) | @Test
FILE: ClassySharkWS/src/com/google/classyshark/Main.java
class Main (line 29) | public class Main {
method Main (line 31) | private Main() {
method isGui (line 34) | private static boolean isGui(List<String> argsAsArray) {
method main (line 38) | public static void main(final String[] args) {
FILE: ClassySharkWS/src/com/google/classyshark/Shark.java
class Shark (line 30) | public class Shark {
method Shark (line 34) | private Shark(File archiveFile) {
method with (line 38) | public static Shark with(File archiveFile) {
method getGeneratedClass (line 46) | public String getGeneratedClass(String className) {
method getAllClassNames (line 53) | public List<String> getAllClassNames() {
method getManifest (line 60) | public String getManifest() {
method getAllMethods (line 67) | public List<String> getAllMethods() {
method getAllStrings (line 74) | public List<String> getAllStrings() {
method isMultiDex (line 82) | public boolean isMultiDex() {
method isCustomMultiDex (line 86) | public boolean isCustomMultiDex() {
method main (line 90) | public static void main(String[] args) {
FILE: ClassySharkWS/src/com/google/classyshark/Version.java
class Version (line 22) | public class Version {
FILE: ClassySharkWS/src/com/google/classyshark/analytics/Analytics.java
type Analytics (line 22) | public enum Analytics {
method addActivation (line 25) | public void addActivation() {
FILE: ClassySharkWS/src/com/google/classyshark/analytics/FocusPoint.java
class FocusPoint (line 29) | public class FocusPoint {
method FocusPoint (line 36) | public FocusPoint(String name) {
method FocusPoint (line 40) | public FocusPoint(String name, FocusPoint parentFocusPoint) {
method getName (line 45) | public String getName() {
method setParentTrackPoint (line 50) | public void setParentTrackPoint(FocusPoint parentFocusPoint) {
method getParentFocusPoint (line 54) | public FocusPoint getParentFocusPoint() {
method getContentURI (line 58) | public String getContentURI() {
method getContentTitle (line 64) | public String getContentTitle() {
method getContentURI (line 70) | private void getContentURI(StringBuffer contentURIBuffer, FocusPoint f...
method encode (line 80) | private String encode(String name) {
method getContentTitle (line 88) | private void getContentTitle(StringBuffer titleBuffer, FocusPoint focu...
FILE: ClassySharkWS/src/com/google/classyshark/analytics/GoogleAnalytics_v1_URLBuildingStrategy.java
class GoogleAnalytics_v1_URLBuildingStrategy (line 31) | public class GoogleAnalytics_v1_URLBuildingStrategy implements URLBuildi...
method GoogleAnalytics_v1_URLBuildingStrategy (line 50) | public GoogleAnalytics_v1_URLBuildingStrategy(String appName, String g...
method GoogleAnalytics_v1_URLBuildingStrategy (line 55) | public GoogleAnalytics_v1_URLBuildingStrategy(String appName, String a...
method buildURL (line 61) | public String buildURL(FocusPoint focusPoint) {
method setRefererURL (line 92) | public void setRefererURL(String refererURL) {
FILE: ClassySharkWS/src/com/google/classyshark/analytics/HTTPGetMethod.java
class HTTPGetMethod (line 30) | public class HTTPGetMethod {
method setLoggingAdapter (line 37) | public void setLoggingAdapter(LoggingAdapter loggingAdapter) {
method HTTPGetMethod (line 45) | HTTPGetMethod() {
method request (line 61) | public void request(String urlString) {
method getResponseCode (line 82) | protected int getResponseCode(HttpURLConnection urlConnection)
method openURLConnection (line 87) | private HttpURLConnection openURLConnection(URL url) throws IOException {
method logMessage (line 91) | private void logMessage(String message) {
method logError (line 97) | private void logError(String errorMesssage) {
FILE: ClassySharkWS/src/com/google/classyshark/analytics/JGoogleAnalyticsTracker.java
class JGoogleAnalyticsTracker (line 27) | public class JGoogleAnalyticsTracker {
method JGoogleAnalyticsTracker (line 39) | public JGoogleAnalyticsTracker(String appName, String googleAnalyticsT...
method JGoogleAnalyticsTracker (line 51) | public JGoogleAnalyticsTracker(String appName, String appVersion, Stri...
method setUrlBuildingStrategy (line 61) | public void setUrlBuildingStrategy(URLBuildingStrategy urlBuildingStra...
method setLoggingAdapter (line 71) | public void setLoggingAdapter(LoggingAdapter loggingAdapter) {
method trackSynchronously (line 85) | public void trackSynchronously(FocusPoint focusPoint) {
method trackAsynchronously (line 96) | public void trackAsynchronously(FocusPoint focusPoint) {
method logMessage (line 101) | private void logMessage(String message) {
class TrackingThread (line 107) | private class TrackingThread extends Thread {
method TrackingThread (line 111) | public TrackingThread(FocusPoint focusPoint) {
method run (line 116) | public void run() {
FILE: ClassySharkWS/src/com/google/classyshark/analytics/LoggingAdapter.java
type LoggingAdapter (line 26) | public interface LoggingAdapter {
method logError (line 28) | public void logError(String errorMessage);
method logMessage (line 30) | public void logMessage(String message);
FILE: ClassySharkWS/src/com/google/classyshark/analytics/URLBuildingStrategy.java
type URLBuildingStrategy (line 26) | public interface URLBuildingStrategy {
method buildURL (line 27) | public String buildURL(FocusPoint focusPoint);
method setRefererURL (line 29) | public void setRefererURL(String refererURL);
FILE: ClassySharkWS/src/com/google/classyshark/cli/CliMode.java
class CliMode (line 32) | public class CliMode {
method CliMode (line 44) | private CliMode() {
method with (line 47) | public static void with(List<String> args) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/GuiMode.java
class GuiMode (line 34) | public class GuiMode {
method GuiMode (line 38) | private GuiMode() {
method with (line 41) | public static void with(final List<String> argsAsArray) {
method getTheme (line 50) | public static Theme getTheme(){
method buildAndShowClassyShark (line 54) | private static void buildAndShowClassyShark(List<String> cmdLineArgs) {
method buildClassySharkFrame (line 69) | private static JFrame buildClassySharkFrame(List<String> cmdLineArgs) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/ArchiveDisplayer.java
type ArchiveDisplayer (line 21) | public interface ArchiveDisplayer {
method displayArchive (line 22) | void displayArchive(File file);
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/ClassySharkPanel.java
class ClassySharkPanel (line 59) | public class ClassySharkPanel extends JPanel
method ClassySharkPanel (line 80) | public ClassySharkPanel(JFrame frame, File archive, String fullClassNa...
method ClassySharkPanel (line 86) | public ClassySharkPanel(JFrame frame, File archive) {
method ClassySharkPanel (line 92) | public ClassySharkPanel(JFrame frame) {
method onSelectedTypeClassFromMouseClick (line 100) | @Override
method onSelectedImportFromMouseClick (line 117) | @Override
method onSelectedClassName (line 124) | @Override
method openArchive (line 129) | @Override
method onGoBackPressed (line 156) | @Override
method onViewTopClassPressed (line 163) | @Override
method onChangedTextFromTypingArea (line 170) | @Override
method onMappingsButtonPressed (line 175) | @Override
method onExportButtonPressed (line 200) | @Override
method onChangeLeftPaneVisibility (line 219) | @Override
method onSettingsButtonPressed (line 230) | @Override
method displayArchive (line 235) | @Override
method onSelectedMethodCount (line 249) | @Override
method keyTyped (line 254) | @Override
method keyPressed (line 258) | @Override
method processKeyPressWithTypedText (line 279) | private static String processKeyPressWithTypedText(KeyEvent e, String ...
method keyReleased (line 296) | @Override
method buildUI (line 300) | private void buildUI() {
method updateUiAfterArchiveReadAndLoadClass (line 352) | private void updateUiAfterArchiveReadAndLoadClass(String className) {
method readArchiveAndFillDisplayArea (line 363) | private void readArchiveAndFillDisplayArea(final String className) {
method readMappingFile (line 397) | private void readMappingFile(final File resultFile) {
method fillDisplayArea (line 415) | private void fillDisplayArea(final String textFromTypingArea,
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/FileTransferHandler.java
class FileTransferHandler (line 32) | public class FileTransferHandler extends TransferHandler {
method FileTransferHandler (line 36) | public FileTransferHandler(ArchiveDisplayer archiveDisplayer) {
method getSourceActions (line 40) | public int getSourceActions(JComponent c) {
method canImport (line 44) | public boolean canImport(TransferSupport ts) {
method importData (line 48) | public boolean importData(TransferSupport ts) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/ViewerController.java
type ViewerController (line 21) | public interface ViewerController extends ArchiveDisplayer {
method onSelectedClassName (line 22) | void onSelectedClassName(String className);
method onSelectedImportFromMouseClick (line 24) | void onSelectedImportFromMouseClick(String classNameFromImportStatement);
method onSelectedTypeClassFromMouseClick (line 26) | void onSelectedTypeClassFromMouseClick(String word);
method onSelectedMethodCount (line 28) | void onSelectedMethodCount(ClassNode rootNode);
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/chart/RingChart.java
class RingChart (line 36) | public class RingChart {
method RingChart (line 139) | public RingChart() {
method RingChart (line 143) | public RingChart(int maxDepth) {
method setSelectedNode (line 147) | public void setSelectedNode(ClassNode selectedNode) {
method getSelectedNode (line 151) | public ClassNode getSelectedNode() {
method render (line 155) | public void render(int width, int height, ClassNode rootNode, Graphics...
method getClassNodeAt (line 178) | public ClassNode getClassNodeAt(int x, int y) {
method renderNode (line 186) | private void renderNode(int width, int height, int radius, int startAn...
method getHighlightColor (line 274) | private Color getHighlightColor(Color color) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/chart/RingChartPanel.java
class RingChartPanel (line 31) | public class RingChartPanel extends JPanel {
method RingChartPanel (line 35) | public RingChartPanel(final ViewerController viewerController) {
method getToolTipText (line 96) | @Override
method setRootNode (line 105) | public void setRootNode(ClassNode rootNode) {
method paint (line 110) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/BatchDocument.java
class BatchDocument (line 25) | class BatchDocument extends DefaultStyledDocument {
method BatchDocument (line 30) | public BatchDocument() {
method appendBatchStringNoLineFeed (line 34) | public void appendBatchStringNoLineFeed(String str,
method appendBatchLineFeed (line 42) | public void appendBatchLineFeed(AttributeSet a) {
method processBatchUpdates (line 52) | public void processBatchUpdates(int offs) throws
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/DisplayArea.java
class DisplayArea (line 49) | public class DisplayArea implements IDisplayArea {
type DisplayDataState (line 51) | private enum DisplayDataState {
method DisplayArea (line 61) | public DisplayArea(final ViewerController viewerController) {
method onAddComponentToPane (line 156) | @Override
method displaySearchResults (line 162) | @Override
method displayClassNames (line 205) | @Override
method displayAllClassesNames (line 259) | private void displayAllClassesNames(List<String> classNames) {
method displayClass (line 287) | @Override
method displayClass (line 318) | @Override
method fillTokensToDoc (line 337) | private void fillTokensToDoc(List<Translator.ELEMENT> from, Document t...
method calcScrollingPosition (line 383) | private int calcScrollingPosition(String textToFind) {
method displaySharkey (line 420) | @Override
method displayError (line 440) | @Override
method clearText (line 462) | private void clearText() {
method getOneColorFormattedOutput (line 466) | private static String getOneColorFormattedOutput(String data) {
method main (line 470) | public static void main(String[] args) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/IDisplayArea.java
type IDisplayArea (line 23) | public interface IDisplayArea {
method onAddComponentToPane (line 24) | Component onAddComponentToPane();
method displayClassNames (line 26) | void displayClassNames(List<String> classNamesToShow,
method displayClass (line 29) | void displayClass(List<Translator.ELEMENT> displayedClassTokens, Strin...
method displayClass (line 31) | void displayClass(String classString);
method displaySharkey (line 33) | void displaySharkey();
method displayError (line 35) | void displayError();
method displaySearchResults (line 37) | void displaySearchResults(List<String> filteredClassNames, List<Transl...
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/ChristmasBG.java
class ChristmasBG (line 22) | class ChristmasBG {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/Doodle.java
class Doodle (line 19) | public class Doodle {
method get (line 20) | public static String get() {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/SanFranBG.java
class SanFranBG (line 20) | public class SanFranBG {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/SharkBG.java
class SharkBG (line 24) | class SharkBG {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/io/CurrentFolderConfig.java
type CurrentFolderConfig (line 27) | public enum CurrentFolderConfig {
method setCurrentDirectory (line 33) | public void setCurrentDirectory(File path) {
method getCurrentDirectory (line 50) | public File getCurrentDirectory() {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/io/FileChooserUtils.java
class FileChooserUtils (line 21) | public class FileChooserUtils {
method FileChooserUtils (line 22) | private FileChooserUtils(){}
method acceptFile (line 24) | public static boolean acceptFile(File f) {
method getFileChooserDescription (line 32) | public static String getFileChooserDescription() {
method isSupportedArchiveFile (line 36) | public static boolean isSupportedArchiveFile(File f) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/io/RecentArchivesConfig.java
type RecentArchivesConfig (line 31) | public enum RecentArchivesConfig {
method addArchive (line 37) | public void addArchive(String name, File currentDirectory) {
method clear (line 60) | public void clear() {
method getRecentArchiveNames (line 78) | public List<String> getRecentArchiveNames() {
method getFilePath (line 107) | public String getFilePath(String name) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/methodscount/MethodsCountPanel.java
class MethodsCountPanel (line 43) | public class MethodsCountPanel extends JPanel {
method MethodsCountPanel (line 49) | public MethodsCountPanel(ViewerController viewerController, File file)...
method MethodsCountPanel (line 55) | public MethodsCountPanel(ViewerController viewerController) throws Hea...
method loadFile (line 61) | public void loadFile(File file) {
method setup (line 65) | private void setup() {
method addNodes (line 96) | private void addNodes(ClassNode parent, DefaultMutableTreeNode jTreePa...
method createDefaultMutableTreeNode (line 104) | private DefaultMutableTreeNode createDefaultMutableTreeNode(ClassNode ...
class NodeWorker (line 110) | class NodeWorker extends SwingWorker<ClassNode, Void> {
method NodeWorker (line 113) | public NodeWorker(File file) {
method doInBackground (line 117) | @Override
method done (line 123) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/reducer/Reducer.java
class Reducer (line 26) | public class Reducer {
method Reducer (line 31) | public Reducer(List<String> allClassNames) {
method reduce (line 36) | public List<String> reduce(String key) {
method getAutocompleteClassName (line 50) | public String getAutocompleteClassName() {
method getAllClassNames (line 58) | public List<String> getAllClassNames() {
method fuzzyReduceClassNames (line 62) | private static List<String> fuzzyReduceClassNames(String key,
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/toolbar/KeyUtils.java
class KeyUtils (line 24) | public class KeyUtils {
method KeyUtils (line 26) | private KeyUtils() {
method isDeletePressed (line 29) | public static boolean isDeletePressed(KeyEvent e) {
method isLeftArrowPressed (line 33) | public static boolean isLeftArrowPressed(KeyEvent e) {
method isRightArrowPressed (line 37) | public static boolean isRightArrowPressed(KeyEvent e) {
method isCommandKeyPressed (line 41) | public static boolean isCommandKeyPressed(KeyEvent e) {
method isLetterOrDigit (line 45) | public static boolean isLetterOrDigit(KeyEvent e) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/toolbar/RecentArchivesButton.java
class RecentArchivesButton (line 38) | public class RecentArchivesButton extends JButton {
method RecentArchivesButton (line 44) | public RecentArchivesButton() {
method setPanel (line 59) | public void setPanel(ToolbarController panel) {
method buildPopup (line 63) | private void buildPopup() {
class RecentFilesListener (line 90) | private class RecentFilesListener implements ActionListener {
method RecentFilesListener (line 93) | public RecentFilesListener(String archiveName) {
method actionPerformed (line 97) | @Override
class MousePopupListener (line 106) | private class MousePopupListener extends MouseAdapter {
method mousePressed (line 107) | public void mousePressed(MouseEvent e) {
method mouseClicked (line 111) | public void mouseClicked(MouseEvent e) {
method mouseReleased (line 115) | public void mouseReleased(MouseEvent e) {
method checkPopup (line 119) | private void checkPopup(MouseEvent e) {
class PopupPrintListener (line 126) | private class PopupPrintListener implements PopupMenuListener {
method popupMenuWillBecomeVisible (line 127) | public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
method popupMenuWillBecomeInvisible (line 131) | public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
method popupMenuCanceled (line 134) | public void popupMenuCanceled(PopupMenuEvent e) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/toolbar/Toolbar.java
class Toolbar (line 39) | public class Toolbar extends JToolBar {
method Toolbar (line 53) | public Toolbar(final ToolbarController toolbarController) {
method addKeyListenerToTypingArea (line 83) | public void addKeyListenerToTypingArea(KeyListener kl) {
method setTypingAreaCaret (line 88) | public void setTypingAreaCaret() {
method getText (line 94) | public String getText() {
method setText (line 98) | public void setText(String text) {
method activateNavigationButtons (line 102) | public void activateNavigationButtons() {
method buildTypingArea (line 108) | private JTextField buildTypingArea() {
method buildOpenButton (line 132) | private JButton buildOpenButton() {
method buildBackButton (line 149) | private JButton buildBackButton() {
method buildViewButton (line 167) | private JButton buildViewButton() {
method buildExportButton (line 185) | private JButton buildExportButton() {
method buildMappingsButton (line 202) | private JButton buildMappingsButton() {
method buildRecentArchivesButton (line 220) | private JButton buildRecentArchivesButton() {
method buildSettingsButton (line 226) | private JButton buildSettingsButton() {
method buildLeftPanelToggleButton (line 241) | private JToggleButton buildLeftPanelToggleButton() {
method main (line 255) | public static void main(String[] args) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/toolbar/ToolbarController.java
type ToolbarController (line 21) | public interface ToolbarController extends ArchiveDisplayer {
method onChangedTextFromTypingArea (line 22) | void onChangedTextFromTypingArea(String text);
method openArchive (line 24) | void openArchive();
method onGoBackPressed (line 26) | void onGoBackPressed();
method onViewTopClassPressed (line 28) | void onViewTopClassPressed();
method onMappingsButtonPressed (line 30) | void onMappingsButtonPressed();
method onExportButtonPressed (line 32) | void onExportButtonPressed();
method onChangeLeftPaneVisibility (line 34) | void onChangeLeftPaneVisibility(boolean selected);
method onSettingsButtonPressed (line 36) | void onSettingsButtonPressed();
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/tree/CellRenderer.java
class CellRenderer (line 10) | public class CellRenderer extends DefaultTreeCellRenderer{
method getBackgroundNonSelectionColor (line 12) | @Override
method getBackgroundSelectionColor (line 17) | @Override
method getBackground (line 22) | @Override
method getTextNonSelectionColor (line 27) | @Override
method getTreeCellRendererComponent (line 32) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/tree/FilesTree.java
class FilesTree (line 43) | public class FilesTree {
method FilesTree (line 48) | public FilesTree(ViewerController viewerPanel) {
method fillArchive (line 59) | public void fillArchive(File loadedFile, List<String> displayedClassNa...
method createTreeModel (line 69) | private TreeNode createTreeModel(File loadedFile,
method createJTreeModelAndroid (line 88) | private TreeNode createJTreeModelAndroid(String fileName,
method fillComponents (line 150) | private void fillComponents(DefaultMutableTreeNode root,
method createJTreeModelClass (line 173) | private TreeNode createJTreeModelClass(String fileName, List<String> d...
method createEmptyJTreeModelClass (line 200) | private TreeNode createEmptyJTreeModelClass() {
method getJTree (line 204) | public Component getJTree() {
method configureJTree (line 208) | private void configureJTree(final JTree jTree) {
method setVisibleRoot (line 261) | public void setVisibleRoot() {
method main (line 265) | public static void main(String[] args) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/panel/tree/NodeInfo.java
class NodeInfo (line 22) | public class NodeInfo {
method NodeInfo (line 26) | public NodeInfo(String fullClassName) {
method toString (line 30) | public String toString() {
method extractClassName (line 34) | public static String extractClassName (String fullname) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/settings/SettingsFrame.java
class SettingsFrame (line 14) | public class SettingsFrame extends JFrame{
method SettingsFrame (line 18) | public SettingsFrame() throws HeadlessException {
method buildThemeUI (line 27) | private JPanel buildThemeUI() {
method buildComboBox (line 36) | private JComboBox<String> buildComboBox() {
method buildThemeLabel (line 43) | private JLabel buildThemeLabel() {
method buildOutPanel (line 50) | private JPanel buildOutPanel() {
method initUI (line 56) | private void initUI() {
FILE: ClassySharkWS/src/com/google/classyshark/gui/settings/ThemeChosenListener.java
class ThemeChosenListener (line 11) | public class ThemeChosenListener implements ActionListener {
method ThemeChosenListener (line 15) | public ThemeChosenListener(JFrame root, JComboBox comboBox) {
method actionPerformed (line 20) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/gui/theme/SwingThemeApplier.java
type SwingThemeApplier (line 3) | interface SwingThemeApplier<T> {
method applyTo (line 5) | void applyTo(T component);
FILE: ClassySharkWS/src/com/google/classyshark/gui/theme/Theme.java
type Theme (line 10) | public interface Theme extends SwingThemeApplier<Component> {
method getToggleIcon (line 12) | ImageIcon getToggleIcon();
method getRecentIcon (line 13) | ImageIcon getRecentIcon();
method getBackIcon (line 14) | ImageIcon getBackIcon();
method getForwardIcon (line 15) | ImageIcon getForwardIcon();
method getOpenIcon (line 16) | ImageIcon getOpenIcon();
method getExportIcon (line 17) | ImageIcon getExportIcon();
method getMappingIcon (line 18) | ImageIcon getMappingIcon();
method getSettingsIcon (line 19) | ImageIcon getSettingsIcon();
method getDefaultColor (line 21) | Color getDefaultColor();
method getKeyWordsColor (line 22) | Color getKeyWordsColor();
method getIdentifiersColor (line 23) | Color getIdentifiersColor();
method getAnnotationsColor (line 24) | Color getAnnotationsColor();
method getSelectionBgColor (line 25) | Color getSelectionBgColor();
method getNamesColor (line 26) | Color getNamesColor();
method getBackgroundColor (line 27) | Color getBackgroundColor();
FILE: ClassySharkWS/src/com/google/classyshark/gui/theme/ThemeManager.java
class ThemeManager (line 12) | public class ThemeManager {
method saveCurrentTheme (line 21) | public static void saveCurrentTheme(Theme theme) {
method getPropertyFile (line 33) | private static File getPropertyFile() throws IOException {
method getCurrentTheme (line 42) | public static Theme getCurrentTheme() {
method getThemes (line 55) | public static String[] getThemes() {
method getThemeIndexFrom (line 59) | public static int getThemeIndexFrom(Theme theme) {
method getThemeFrom (line 67) | public static Theme getThemeFrom(final int index) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/theme/dark/DarkColorScheme.java
class DarkColorScheme (line 5) | class DarkColorScheme {
method DarkColorScheme (line 7) | private DarkColorScheme() {}
FILE: ClassySharkWS/src/com/google/classyshark/gui/theme/dark/DarkIconScheme.java
class DarkIconScheme (line 3) | public class DarkIconScheme {
FILE: ClassySharkWS/src/com/google/classyshark/gui/theme/dark/DarkTheme.java
class DarkTheme (line 32) | public class DarkTheme implements Theme{
method DarkTheme (line 43) | public DarkTheme() {
method getToggleIcon (line 57) | @Override
method getRecentIcon (line 62) | @Override
method getBackIcon (line 67) | @Override
method getForwardIcon (line 72) | @Override
method getOpenIcon (line 77) | @Override
method getExportIcon (line 82) | @Override
method getMappingIcon (line 87) | @Override
method getSettingsIcon (line 92) | @Override
method getDefaultColor (line 97) | @Override
method getKeyWordsColor (line 102) | @Override
method getIdentifiersColor (line 107) | @Override
method getAnnotationsColor (line 112) | @Override
method getSelectionBgColor (line 117) | @Override
method getNamesColor (line 122) | @Override
method getBackgroundColor (line 127) | @Override
method applyTo (line 132) | @Override
method shallBeLighter (line 147) | private boolean shallBeLighter(Component component) {
FILE: ClassySharkWS/src/com/google/classyshark/gui/theme/light/LightColorScheme.java
class LightColorScheme (line 24) | class LightColorScheme {
method LightColorScheme (line 25) | private LightColorScheme(){}
FILE: ClassySharkWS/src/com/google/classyshark/gui/theme/light/LightIconScheme.java
class LightIconScheme (line 4) | class LightIconScheme {
FILE: ClassySharkWS/src/com/google/classyshark/gui/theme/light/LightTheme.java
class LightTheme (line 24) | public class LightTheme implements Theme {
method LightTheme (line 34) | public LightTheme() {
method getToggleIcon (line 45) | @Override
method getRecentIcon (line 50) | @Override
method getBackIcon (line 55) | @Override
method getForwardIcon (line 60) | @Override
method getOpenIcon (line 65) | @Override
method getExportIcon (line 70) | @Override
method getMappingIcon (line 75) | @Override
method getSettingsIcon (line 80) | @Override
method getDefaultColor (line 85) | @Override
method getKeyWordsColor (line 90) | @Override
method getIdentifiersColor (line 95) | @Override
method getAnnotationsColor (line 100) | @Override
method getSelectionBgColor (line 105) | @Override
method getNamesColor (line 110) | @Override
method getBackgroundColor (line 115) | @Override
method applyTo (line 120) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/FullArchiveReader.java
type FullArchiveReader (line 22) | public interface FullArchiveReader {
method readAsyncArchive (line 23) | void readAsyncArchive(File file);
method buildTranslator (line 25) | Translator buildTranslator(String className, File archiveFile);
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/SilverGhost.java
class SilverGhost (line 34) | public class SilverGhost {
method SilverGhost (line 49) | public SilverGhost() {
method setBinaryArchive (line 52) | public void setBinaryArchive(File binArchive) {
method readContents (line 60) | public void readContents() {
method getBinaryArchive (line 78) | public File getBinaryArchive() {
method getComponents (line 82) | public List<ContentReader.Component> getComponents() {
method getAllClassNames (line 86) | public List<String> getAllClassNames() {
method getAutoCompleteClassName (line 90) | public String getAutoCompleteClassName() {
method initClassNameFiltering (line 94) | public void initClassNameFiltering() {
method filter (line 98) | public List<String> filter(String text) {
method isArchiveError (line 102) | public boolean isArchiveError() {
method readMappingFile (line 111) | public TokensMapper readMappingFile(File mappingFile) {
method addMappings (line 116) | public void addMappings(TokensMapper tokensMapper) {
method translateArchiveElement (line 121) | public void translateArchiveElement(String elementName) {
method getArchiveElementTokens (line 132) | public List<Translator.ELEMENT> getArchiveElementTokens() {
method getImportsForCurrentClass (line 136) | public List<String> getImportsForCurrentClass() {
method getCurrentClassName (line 140) | public String getCurrentClassName() {
method getCurrentClassContent (line 144) | public String getCurrentClassContent() {
method getManifestMatches (line 148) | public List<Translator.ELEMENT> getManifestMatches(String textFromTypi...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/SilverGhostFacade.java
class SilverGhostFacade (line 39) | public class SilverGhostFacade {
method SilverGhostFacade (line 40) | private SilverGhostFacade() {
method getAllClassNames (line 44) | public static List<String> getAllClassNames(File archiveFile) {
method exportClassFromApk (line 50) | public static void exportClassFromApk(List<String> args) {
method getGeneratedClassString (line 71) | public static String getGeneratedClassString(String className, File ar...
method inspectApk (line 86) | public static void inspectApk(List<String> args) {
method getManifest (line 98) | public static String getManifest(File archiveFile) {
method getAllMethods (line 108) | public static List<String> getAllMethods(File archiveFile) {
method inspectPackages (line 115) | public static void inspectPackages(List<String> args) {
method getAllStrings (line 139) | public static List<String> getAllStrings(File archiveFile) {
method exportArchive (line 147) | public static void exportArchive(List<String> args) {
method isMultiDex (line 163) | public static boolean isMultiDex(File archiveFile) {
method isCustomMultiDex (line 189) | public static boolean isCustomMultiDex(File archiveFile) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/TokensMapper.java
type TokensMapper (line 22) | public interface TokensMapper {
method readMappings (line 24) | TokensMapper readMappings(File file);
method getReverseClasses (line 26) | Map<String,String> getReverseClasses();
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/BinaryContentReader.java
type BinaryContentReader (line 24) | public interface BinaryContentReader {
method read (line 26) | void read();
method getClassNames (line 28) | List<String> getClassNames();
method getComponents (line 30) | List<ContentReader.Component> getComponents();
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/ContentReader.java
class ContentReader (line 32) | public class ContentReader {
type ARCHIVE_COMPONENT (line 37) | public enum ARCHIVE_COMPONENT {
class Component (line 41) | public static class Component {
method Component (line 43) | public Component(String name, ARCHIVE_COMPONENT component) {
method ContentReader (line 55) | public ContentReader(File binaryArchive) {
method load (line 74) | public void load() {
method getAllClassNames (line 85) | public List<String> getAllClassNames() {
method getAllComponents (line 90) | public List<Component> getAllComponents() {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/aar/AarReader.java
class AarReader (line 33) | public class AarReader implements BinaryContentReader {
method AarReader (line 39) | public AarReader(File binaryArchive) {
method read (line 43) | @Override
method getClassNames (line 79) | @Override
method getComponents (line 84) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/apk/ApkReader.java
class ApkReader (line 27) | public class ApkReader implements BinaryContentReader {
method ApkReader (line 33) | public ApkReader(File binaryArchive) {
method read (line 37) | @Override
method getClassNames (line 45) | @Override
method getComponents (line 50) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/clazz/ClassNameVisitor.java
class ClassNameVisitor (line 22) | public class ClassNameVisitor extends ClassVisitor {
method ClassNameVisitor (line 26) | public ClassNameVisitor() {
method visit (line 30) | public void visit(int version, int access, String name,
method getName (line 36) | public String getName() {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/clazz/ClazzReader.java
class ClazzReader (line 30) | public class ClazzReader implements BinaryContentReader {
method ClazzReader (line 35) | public ClazzReader(File binaryArchive) {
method read (line 39) | @Override
method getClassNames (line 58) | @Override
method getComponents (line 63) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/dex/DexReader.java
class DexReader (line 29) | public class DexReader implements BinaryContentReader {
method DexReader (line 33) | public DexReader(File binaryArchive) {
method read (line 37) | @Override
method getClassNames (line 48) | @Override
method getComponents (line 53) | @Override
method readClassNamesFromDex (line 58) | public static List<String> readClassNamesFromDex(File binaryArchiveFil...
method main (line 71) | public static void main(String[] args) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/dex/DexlibLoader.java
class DexlibLoader (line 9) | public class DexlibLoader {
method loadDexFile (line 10) | public static DexFile loadDexFile(File binaryArchiveFile) throws Excep...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/jar/JarReader.java
class JarReader (line 30) | public class JarReader implements BinaryContentReader {
method JarReader (line 36) | public JarReader(File binaryArchive) {
method read (line 40) | @Override
method getClassNames (line 51) | @Override
method getComponents (line 56) | @Override
method readClassNamesFromJar (line 61) | public static List<String> readClassNamesFromJar(File jarFile,
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/exporter/Exporter.java
class Exporter (line 39) | public class Exporter {
method Exporter (line 41) | private Exporter() {
method writeArchive (line 44) | public static void writeArchive(File archive, List<String> allClasses)...
method writeCurrentClass (line 52) | public static void writeCurrentClass(String className, String content)
method writeMethodCounts (line 57) | public static void writeMethodCounts(File archive) {
method writeManifest (line 70) | public static void writeManifest(File apk) throws IOException {
method writeClassNames (line 79) | public static void writeClassNames(List<String> allClassNames)
method writeMethods (line 84) | public static void writeMethods(File archiveFile) {
method writeStringTables (line 93) | public static void writeStringTables(File archiveFile) {
method writeString (line 102) | private static void writeString(String to, String what) throws IOExcep...
method writeListStringsChannel (line 109) | private static void writeListStringsChannel(File to, List<String> allS...
method writeListStrings (line 127) | private static void writeListStrings(File to, List<String> allStrings) {
method main (line 139) | public static void main(String[] args) throws Exception {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/exporter/FlatMethodCountExporter.java
class FlatMethodCountExporter (line 23) | public class FlatMethodCountExporter implements MethodCountExporter {
method FlatMethodCountExporter (line 26) | public FlatMethodCountExporter(PrintWriter pw) {
method exportMethodCounts (line 30) | public void exportMethodCounts(ClassNode rootNode) {
method printNode (line 35) | private void printNode(ClassNode classNode, String[] path) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/exporter/MethodCountExporter.java
type MethodCountExporter (line 21) | public interface MethodCountExporter {
method exportMethodCounts (line 22) | void exportMethodCounts(ClassNode rootNode);
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/exporter/TreeMethodCountExporter.java
class TreeMethodCountExporter (line 23) | public class TreeMethodCountExporter implements MethodCountExporter {
method TreeMethodCountExporter (line 26) | public TreeMethodCountExporter(PrintWriter pw) {
method exportMethodCounts (line 30) | public void exportMethodCounts(ClassNode rootNode) {
method printNode (line 35) | private void printNode(ClassNode classNode, boolean[] isFinalLevel) {
method renderTreeStructure (line 50) | private void renderTreeStructure(boolean[] levels) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/io/SherlockHash.java
type SherlockHash (line 26) | public enum SherlockHash {
class BinaryPack (line 32) | private static class BinaryPack {
method BinaryPack (line 36) | public BinaryPack(long timeStamp) {
method getFileFromZipStream (line 41) | public File getFileFromZipStream(File binaryFile, ZipInputStream zipIn...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/methodscounter/ClassInfo.java
class ClassInfo (line 19) | public class ClassInfo {
method ClassInfo (line 23) | public ClassInfo(String packageName, int methodCount) {
method getPackageName (line 28) | public String getPackageName() {
method getMethodCount (line 32) | public int getMethodCount() {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/methodscounter/ClassNode.java
class ClassNode (line 22) | public class ClassNode {
method ClassNode (line 27) | public ClassNode(String key) {
method ClassNode (line 31) | public ClassNode() {
method getChildNodes (line 34) | public Map<String, ClassNode> getChildNodes() {
method getKey (line 38) | public String getKey() {
method getMethodCount (line 42) | public int getMethodCount() {
method add (line 46) | public void add(ClassInfo classInfo) {
method add (line 52) | private void add(int currentPost, String[] packages, ClassInfo classIn...
method toString (line 67) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/methodscounter/RootBuilder.java
class RootBuilder (line 41) | public class RootBuilder {
method fillClassesWithMethods (line 42) | public ClassNode fillClassesWithMethods(File file) {
method fillClassesWithMethods (line 53) | public ClassNode fillClassesWithMethods(String fileName) {
method fillFromAar (line 57) | private ClassNode fillFromAar(File file) {
method fillFromJar (line 89) | private ClassNode fillFromJar(File file) {
method fillFromJayce (line 117) | private ClassNode fillFromJayce(File file) {
method fillFromDex (line 136) | private void fillFromDex(File file, ClassNode rootNode) {
method fillFromDex (line 158) | private ClassNode fillFromDex(File file) {
method fillFromApk (line 164) | private ClassNode fillFromApk(File file) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/plugins/EmptyFullArchiveReader.java
class EmptyFullArchiveReader (line 26) | public class EmptyFullArchiveReader implements FullArchiveReader{
method readAsyncArchive (line 27) | @Override
method buildTranslator (line 32) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/plugins/IdentityMapper.java
class IdentityMapper (line 24) | public class IdentityMapper implements TokensMapper {
method IdentityMapper (line 28) | public IdentityMapper() {
method readMappings (line 32) | @Override
method getReverseClasses (line 37) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/Translator.java
type Translator (line 26) | public interface Translator {
type TAG (line 31) | enum TAG {
class ELEMENT (line 39) | class ELEMENT {
method ELEMENT (line 40) | public ELEMENT(String word, TAG tag) {
method getClassName (line 49) | String getClassName();
method addMapper (line 51) | void addMapper(TokensMapper reverseMappings);
method apply (line 53) | void apply();
method getElementsList (line 55) | List<ELEMENT> getElementsList();
method getDependencies (line 57) | List<String> getDependencies();
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/TranslatorFactory.java
class TranslatorFactory (line 34) | public class TranslatorFactory {
method createTranslator (line 36) | public static Translator createTranslator(String className, File archi...
method createTranslator (line 41) | public static Translator createTranslator(String className, File archi...
method createTranslator (line 47) | public static Translator createTranslator(String className, File archi...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/ApkTranslator.java
class ApkTranslator (line 30) | public class ApkTranslator implements Translator {
method ApkTranslator (line 37) | public ApkTranslator(File apkFile) {
method getClassName (line 42) | @Override
method addMapper (line 47) | @Override
method apply (line 52) | @Override
method getElementsList (line 65) | @Override
method getDependencies (line 70) | @Override
method toString (line 75) | public String toString() {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/ApkDashboard.java
class ApkDashboard (line 37) | public class ApkDashboard {
method ApkDashboard (line 49) | public ApkDashboard(File apkFile) {
method inspect (line 53) | public void inspect() {
method getAllDexEntries (line 58) | public List<ClassesDexDataEntry> getAllDexEntries() {
method getFullPathNativeLibNamesSorted (line 66) | public List<String> getFullPathNativeLibNamesSorted() {
method getNativeLibNamesSorted (line 71) | public List<String> getNativeLibNamesSorted() {
method getPrivateLibErrorTag (line 82) | public String getPrivateLibErrorTag(String nativeLib) {
method getClassesWithNativeMethodsPerDexIndex (line 92) | public static Set<String> getClassesWithNativeMethodsPerDexIndex(int d...
method getJavaDependenciesErrors (line 101) | public List<String> getJavaDependenciesErrors() {
method fillAnalysisPerClassesDexIndex (line 108) | public static ClassesDexDataEntry fillAnalysisPerClassesDexIndex(int d...
method extractLibNamesFromFullPaths (line 138) | private static List<String> extractLibNamesFromFullPaths(List<String> ...
method getManifestRecommendations (line 156) | public List<String> getManifestRecommendations() {
method toString (line 164) | public String toString() {
method addRow (line 205) | private void addRow(List<String[]> data, String param1, String param2) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/ApkNativeMethodsVisitor.java
class ApkNativeMethodsVisitor (line 25) | public class ApkNativeMethodsVisitor extends ApplicationVisitor {
method ApkNativeMethodsVisitor (line 28) | public ApkNativeMethodsVisitor(ClassesDexDataEntry dexData) {
method visitClass (line 33) | public ClassVisitor visitClass(int access, String name, String[] signa...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/ClassesDexDataEntry.java
class ClassesDexDataEntry (line 23) | public class ClassesDexDataEntry implements Comparable {
method ClassesDexDataEntry (line 30) | public ClassesDexDataEntry(int index) {
method compareTo (line 34) | @Override
method getName (line 43) | public String getName() {
method toString (line 55) | public String toString() {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/DynamicSymbolsInspector.java
class DynamicSymbolsInspector (line 22) | public class DynamicSymbolsInspector {
method DynamicSymbolsInspector (line 28) | public DynamicSymbolsInspector(Elf elf) {
method areErrors (line 33) | public boolean areErrors() {
method getErrors (line 37) | public String getErrors() {
method inspect (line 41) | private void inspect() {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/JavaDependenciesInspector.java
class JavaDependenciesInspector (line 22) | public class JavaDependenciesInspector {
method JavaDependenciesInspector (line 48) | public JavaDependenciesInspector(List<String> allClasses) {
method getInspections (line 52) | public List<String> getInspections() {
method updateLogic (line 109) | private void updateLogic(String cName) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/PrivateNativeLibsInspector.java
class PrivateNativeLibsInspector (line 23) | public class PrivateNativeLibsInspector {
method isPrivate (line 56) | public static boolean isPrivate(String nativeLib, List<String> nativeL...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/SyntheticAccessorsInspector.java
class SyntheticAccessorsInspector (line 29) | public class SyntheticAccessorsInspector {
method SyntheticAccessorsInspector (line 32) | public SyntheticAccessorsInspector(DexFile dxFile) {
method getSyntheticAccessors (line 36) | public List<String> getSyntheticAccessors() {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/Table.java
class Table (line 29) | public class Table {
method getTable (line 31) | public static <T> String getTable(Collection<T> objects, List<Column.D...
method getTable (line 58) | public static String getTable(String[] header, String[][] data) {
method getTable (line 73) | public static String getTable(Column[] headerObjs, String[][] data) {
method getRowDataBuf (line 139) | private static String getRowDataBuf(int colCount, List<Integer> colMax...
method getFormattedData (line 174) | private static String getFormattedData(int maxLength, String data, Col...
method getRowLineBuf (line 212) | private static String getRowLineBuf(int colCount, List<Integer> colMax...
method getMaxItemLength (line 235) | private static int getMaxItemLength(List<String> colData) {
method getMaxColumns (line 243) | private static int getMaxColumns(String[] header, String[][] data) {
method getMaxColLengths (line 252) | private static List<Integer> getMaxColLengths(int colCount, String[] h...
method getHeaders (line 279) | private static String[] getHeaders(Column[] headerObjs) {
class Column (line 292) | public static class Column {
type Align (line 295) | public enum Align {
method Column (line 308) | public Column(String headerName) {
method Column (line 313) | public Column(String header, Align headerAlign, Align dataAlign) {
method with (line 320) | public <T> Data<T> with(Function<T, String> getter) {
class Data (line 325) | public static class Data<T> {
method Data (line 329) | private Data(Column column, Function<T, String> getter) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/manifest/AndroidManifestPlainTextReader.java
class AndroidManifestPlainTextReader (line 41) | public class AndroidManifestPlainTextReader {
method AndroidManifestPlainTextReader (line 45) | public AndroidManifestPlainTextReader(File xmlFile) {
method AndroidManifestPlainTextReader (line 58) | public AndroidManifestPlainTextReader(String xmlString) {
method getActionsWithReceivers (line 72) | public Map<String, String> getActionsWithReceivers() {
method getServices (line 98) | public List<String> getServices() {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/manifest/ManifestInspector.java
class ManifestInspector (line 25) | public class ManifestInspector {
method ManifestInspector (line 29) | public ManifestInspector(File apkFile) {
method getInspections (line 33) | public List<String> getInspections() {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/manifest/ReceiverActionsBL.java
class ReceiverActionsBL (line 25) | public class ReceiverActionsBL {
method ReceiverActionsBL (line 63) | public ReceiverActionsBL(Map<String, String> actionsToReceivers) {
method getBGActionsList (line 67) | public List<String> getBGActionsList() {
method filterBGActions (line 76) | private Map<String, String> filterBGActions(Map<String, String> action...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/dex/DexInfoTranslator.java
class DexInfoTranslator (line 37) | public class
method DexInfoTranslator (line 44) | public DexInfoTranslator(String dexFileName, File apkFile) {
method getClassName (line 49) | @Override
method addMapper (line 54) | @Override
method apply (line 59) | @Override
method getElementsList (line 102) | @Override
method getDependencies (line 107) | @Override
method setIndex (line 112) | public void setIndex(int index) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/dex/DexMethodsDumper.java
class DexMethodsDumper (line 41) | public class DexMethodsDumper {
method dumpMethods (line 43) | public static List<String> dumpMethods(File archiveFile) {
method fillAnalysis (line 100) | private static List<String> fillAnalysis(int dexIndex, File file) thro...
class ApkInspectVisitor (line 111) | private static class ApkInspectVisitor extends ApplicationVisitor {
method ApkInspectVisitor (line 114) | public ApkInspectVisitor(List<String> methodsList) {
method getDecName (line 119) | static String getDecName(String dexType) {
method popType (line 136) | static String popType(String desc) {
method popReturn (line 140) | static String popReturn(String desc) {
method nextTypePosition (line 144) | static int nextTypePosition(String desc, int pos) {
method visitClass (line 151) | public ClassVisitor visitClass(int access, String name, String[] sig...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/dex/DexStringsDumper.java
class DexStringsDumper (line 31) | public class DexStringsDumper {
method dumpStrings (line 33) | public static List<String> dumpStrings(File apkFile) {
method main (line 84) | public static void main(String[] args) throws Exception {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/elf/ElfReader.java
class ElfReader (line 33) | public class ElfReader {
class Symbol (line 191) | public static class Symbol {
method Symbol (line 201) | Symbol(String name, int st_info) {
method read (line 267) | static ElfReader read(File file) throws IOException {
method isDynamic (line 271) | boolean isDynamic() {
method getType (line 275) | int getType() {
method isPIE (line 279) | boolean isPIE() {
method ElfReader (line 283) | private ElfReader(File file) throws IOException {
method finalize (line 289) | protected void finalize() throws Throwable {
method readHeader (line 299) | private void readHeader() throws IOException {
method readSectionHeaders (line 312) | private void readSectionHeaders(long tableOffset, int shNumber, int sh...
method readProgramHeaders (line 360) | private void readProgramHeaders(long phOffset, int phNumber, int phSiz...
method readSymbolTable (line 373) | private void readSymbolTable(Map<String, Symbol> symbolMap, long symSt...
method readShStrTabEntry (line 390) | private String readShStrTabEntry(long strOffset) throws IOException {
method readStrTabEntry (line 397) | private String readStrTabEntry(long tableOffset, long tableSize, long ...
method getHeaderOffset (line 405) | private int getHeaderOffset(int halfWorldOffset) {
method readByte (line 409) | private int readByte(long offset) throws IOException {
method readHalf (line 415) | private int readHalf(long offset) throws IOException {
method readWord (line 427) | private long readWord(long offset) throws IOException {
method readString (line 444) | private String readString(long offset) throws IOException {
method readIdent (line 455) | private void readIdent() throws IOException {
method getSymbol (line 472) | public Symbol getSymbol(String name) {
method getDynamicSymbol (line 487) | public Symbol getDynamicSymbol(String name) {
method getDynamicSymbols (line 503) | public List<String> getDynamicSymbols() {
method main (line 512) | public static void main(String[] args) throws Exception {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/elf/ElfTranslator.java
class ElfTranslator (line 37) | public class ElfTranslator implements Translator {
method ElfTranslator (line 45) | public ElfTranslator(String className, File archiveFile) {
method getClassName (line 51) | @Override
method addMapper (line 56) | @Override
method apply (line 61) | @Override
method getElementsList (line 83) | @Override
method getDependencies (line 98) | @Override
method extractElf (line 105) | public static File extractElf(String elfName, File apkFile) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/jar/JarInfoTranslator.java
class JarInfoTranslator (line 31) | public class JarInfoTranslator implements Translator {
method JarInfoTranslator (line 37) | public JarInfoTranslator(File jarArchive, List<String> allClassNames) {
method getClassName (line 42) | @Override
method addMapper (line 47) | @Override
method apply (line 52) | @Override
method getElementsList (line 62) | @Override
method getDependencies (line 67) | @Override
method readableFileSize (line 72) | public static String readableFileSize(long size) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/JavaTranslator.java
class JavaTranslator (line 34) | public class JavaTranslator implements Translator {
method JavaTranslator (line 45) | public JavaTranslator(Class clazz) {
method JavaTranslator (line 51) | public JavaTranslator(String className, File archiveFile) {
method getClassName (line 58) | @Override
method addMapper (line 63) | @Override
method apply (line 69) | @Override
method toString (line 98) | @Override
method getElementsList (line 111) | @Override
method getDependencies (line 116) | @Override
method fillTypes (line 121) | private void fillTypes(MetaObject.InterfaceInfo[] interfaces,
method fillSource (line 159) | private void fillSource(MetaObject.InterfaceInfo[] interfaces,
method fillImports (line 171) | private static void fillImports(QualifiedTypesMap namesMapper, List<EL...
method fillClassDecl (line 181) | private static void fillClassDecl(MetaObject.InterfaceInfo[] interfaces,
method fillFields (line 222) | private static void fillFields(MetaObject.FieldInfo[] fields,
method fillCtors (line 253) | private static void fillCtors(MetaObject.ConstructorInfo[] constructors,
method fillMethods (line 285) | private static void fillMethods(MetaObject.MethodInfo[] methods,
method testJar (line 347) | public static void testJar() {
method testSystemClass (line 356) | public static void testSystemClass() {
method testCustomClass (line 362) | public static void testCustomClass() {
method testInnerClass (line 371) | public static void testInnerClass() {
method main (line 380) | public static void main(String[] args) throws Exception {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/MetaObject.java
class MetaObject (line 22) | public abstract class MetaObject {
class InterfaceInfo (line 27) | public static class InterfaceInfo {
class FieldInfo (line 35) | public static class FieldInfo implements Comparable {
method compareTo (line 42) | @Override
class ConstructorInfo (line 56) | public static class ConstructorInfo {
class MethodInfo (line 65) | public static class MethodInfo implements Comparable{
method compareTo (line 74) | @Override
class AnnotationInfo (line 89) | public static class AnnotationInfo {
class ParameterInfo (line 96) | public static class ParameterInfo {
class ExceptionInfo (line 104) | public static class ExceptionInfo {
method getClassGenerics (line 108) | public abstract String getClassGenerics(String name);
method getName (line 110) | public abstract String getName();
method getAnnotations (line 112) | public abstract AnnotationInfo[] getAnnotations();
method getModifiers (line 114) | public abstract int getModifiers();
method getSuperclass (line 116) | public abstract String getSuperclass();
method getSuperclassGenerics (line 118) | public abstract String getSuperclassGenerics();
method getInterfaces (line 120) | public abstract InterfaceInfo[] getInterfaces();
method getDeclaredFields (line 122) | public abstract FieldInfo[] getDeclaredFields();
method getDeclaredConstructors (line 124) | public abstract ConstructorInfo[] getDeclaredConstructors();
method getDeclaredMethods (line 126) | public abstract MethodInfo[] getDeclaredMethods();
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/MetaObjectFactory.java
class MetaObjectFactory (line 40) | public class MetaObjectFactory {
method MetaObjectFactory (line 41) | private MetaObjectFactory() {
method buildMetaObject (line 44) | public static MetaObject buildMetaObject(String className, File archiv...
method getMetaObjectFromAar (line 64) | private static MetaObject getMetaObjectFromAar(String className, File ...
method getMetaObjectFromJar (line 94) | private static MetaObject getMetaObjectFromJar(String className, File ...
method verifyLoadedClassAndBuildASMFallback (line 114) | private static MetaObject verifyLoadedClassAndBuildASMFallback(String ...
method getMetaObjectFromApk (line 137) | private static MetaObject getMetaObjectFromApk(String className, File ...
method getMetaObjectFromDex (line 149) | private static MetaObject getMetaObjectFromDex(String className, File ...
method getMetaObjectFromClass (line 161) | private static MetaObject getMetaObjectFromClass(File archiveFile) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/MetaObjectWithMapper.java
class MetaObjectWithMapper (line 24) | public class MetaObjectWithMapper extends MetaObject {
method MetaObjectWithMapper (line 29) | public MetaObjectWithMapper(MetaObject metaObject, TokensMapper revers...
method getClassGenerics (line 36) | @Override
method getName (line 41) | @Override
method getAnnotations (line 55) | @Override
method getModifiers (line 60) | @Override
method getSuperclass (line 65) | @Override
method getSuperclassGenerics (line 70) | @Override
method getInterfaces (line 75) | @Override
method getDeclaredFields (line 80) | @Override
method getDeclaredConstructors (line 85) | @Override
method getDeclaredMethods (line 90) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/StressTest.java
class StressTest (line 36) | public class StressTest {
method runAllClassesInJar (line 37) | public static void runAllClassesInJar(String jarCanonicalPath) throws ...
method runAllClassesInDex (line 49) | public static void runAllClassesInDex(String jarCanonicalPath) throws ...
method main (line 62) | public static void main(String[] args) throws Exception {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/QualifiedTypesMap.java
class QualifiedTypesMap (line 29) | public class QualifiedTypesMap {
method QualifiedTypesMap (line 33) | public QualifiedTypesMap() {
method getFullTypes (line 37) | public List<String> getFullTypes() {
method addType (line 43) | public void addType(String type) {
method getType (line 51) | public String getType(String type) {
method getTypeNull (line 59) | public String getTypeNull(String type) {
method removeType (line 67) | public void removeType(String name) {
method decodeAndStore (line 71) | public static String decodeAndStore(String typeName, HashMap<String, S...
method isArray (line 102) | private static boolean isArray(char typeName) {
method extractReference (line 106) | private static String extractReference(String param) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/asm/ClassBytesFromJarExtractor.java
class ClassBytesFromJarExtractor (line 31) | public class ClassBytesFromJarExtractor {
method getBytes (line 32) | public static byte[] getBytes(String fullClassName, String jar) throws...
method getBytes (line 56) | public static byte[] getBytes(InputStream is) throws IOException {
method bytesToHex (line 68) | public static String bytesToHex(byte[] bytes) {
method main (line 78) | public static void main(String[] args) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/asm/ClassDetailsFiller.java
class ClassDetailsFiller (line 40) | public class ClassDetailsFiller extends ClassVisitor {
method ClassDetailsFiller (line 51) | public ClassDetailsFiller() {
method visit (line 55) | public void visit(int version, int access, String name,
method visitSource (line 69) | public void visitSource(String source, String debug) {
method visitOuterClass (line 72) | public void visitOuterClass(String owner, String name, String desc) {
method visitAnnotation (line 75) | public AnnotationVisitor visitAnnotation(String desc,
method visitAttribute (line 80) | public void visitAttribute(Attribute attr) {
method visitInnerClass (line 83) | public void visitInnerClass(String name, String outerName,
method visitField (line 87) | public FieldVisitor visitField(int access, String name, String desc,
method visitMethod (line 102) | public MethodVisitor visitMethod(int access, String name,
method fillConstructor (line 135) | private void fillConstructor(int access, String desc) {
method visitEnd (line 154) | public void visitEnd() {
method getClassGenerics (line 157) | public String getClassGenerics(String name) {
method getName (line 161) | public String getName() {
method getAnnotationInfo (line 165) | public MetaObject.AnnotationInfo[] getAnnotationInfo() {
method getModifiers (line 169) | public int getModifiers() {
method getSuperClass (line 173) | public String getSuperClass() {
method getSuperclassGenerics (line 177) | public String getSuperclassGenerics() {
method getInterfaces (line 181) | public MetaObject.InterfaceInfo[] getInterfaces() {
method getDeclaredFields (line 186) | public MetaObject.FieldInfo[] getDeclaredFields() {
method getDeclaredConstructors (line 191) | public MetaObject.ConstructorInfo[] getDeclaredConstructors() {
method getDeclaredMethods (line 197) | public MetaObject.MethodInfo[] getDeclaredMethods() {
method main (line 202) | public static void main(String[] args) throws Exception {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/asm/MetaObjectAsmClass.java
class MetaObjectAsmClass (line 31) | public class MetaObjectAsmClass extends MetaObject {
method MetaObjectAsmClass (line 35) | public MetaObjectAsmClass(String className, File archiveFile) {
method MetaObjectAsmClass (line 51) | public MetaObjectAsmClass(File archiveFile) {
method MetaObjectAsmClass (line 64) | public MetaObjectAsmClass(Class clazz) throws Exception {
method getClassGenerics (line 75) | @Override
method getName (line 80) | @Override
method getAnnotations (line 85) | @Override
method getModifiers (line 90) | @Override
method getSuperclass (line 95) | @Override
method getSuperclassGenerics (line 100) | @Override
method getInterfaces (line 105) | @Override
method getDeclaredFields (line 110) | @Override
method getDeclaredConstructors (line 115) | @Override
method getDeclaredMethods (line 120) | @Override
method testCustomClass (line 125) | public static void testCustomClass() throws Exception {
method main (line 134) | public static void main(String[] args) throws Exception {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/reflect/ClassUtils.java
class ClassUtils (line 27) | public class ClassUtils {
method ClassUtils (line 29) | private ClassUtils() {
method loadClassFromJar (line 32) | public static Class loadClassFromJar(String jarAbsolutePath, String cl...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/reflect/MetaObjectClass.java
class MetaObjectClass (line 36) | public class MetaObjectClass extends MetaObject {
method MetaObjectClass (line 39) | public MetaObjectClass(Class clazz) {
method getAnnotations (line 44) | @Override
method getModifiers (line 49) | @Override
method getSuperclass (line 54) | @Override
method getName (line 62) | @Override
method getClassGenerics (line 67) | @Override
method getSuperclassGenerics (line 78) | @Override
method getInterfaces (line 92) | @Override
method getDeclaredFields (line 111) | @Override
method getDeclaredConstructors (line 136) | @Override
method getDeclaredMethods (line 154) | @Override
method getClassGenericsString (line 183) | private String getClassGenericsString(TypeVariable[] tv) {
method convertAnnotations (line 194) | private AnnotationInfo[] convertAnnotations(Annotation[] annotations) {
method convertParameters (line 206) | private ParameterInfo[] convertParameters(Class<?>[] parameterTypes, T...
method getFieldGenericsString (line 227) | private String getFieldGenericsString(Type[] actualTypeArguments) {
method convertExceptions (line 241) | private ExceptionInfo[] convertExceptions(Class<?>[] exceptionTypes) {
method main (line 253) | public static void main(String[] args) throws Exception {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/dex/DexlibAdapter.java
class DexlibAdapter (line 28) | public class DexlibAdapter {
method getTypeName (line 44) | public static String getTypeName(String dexlibType) {
method getClassDefByName (line 55) | public static ClassDef getClassDefByName(String className, DexFile dex...
method isMatchFromDex (line 71) | public static boolean isMatchFromDex(String className, String dexName) {
method getClassStringFromDex (line 76) | public static String getClassStringFromDex(String dexName) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/dex/MetaObjectDex.java
class MetaObjectDex (line 38) | public class MetaObjectDex extends MetaObject {
method MetaObjectDex (line 42) | public MetaObjectDex(ClassDef classDef) {
method getName (line 51) | @Override
method getInterfaces (line 56) | @Override
method getDeclaredFields (line 69) | @Override
method getDeclaredConstructors (line 88) | @Override
method getDeclaredMethods (line 108) | @Override
method getAnnotations (line 131) | @Override
method convertAnnotations (line 136) | private AnnotationInfo[] convertAnnotations(Set<? extends Annotation> ...
method convertParameters (line 149) | private ParameterInfo[] convertParameters(List<? extends MethodParamet...
method getClassGenerics (line 161) | @Override
method getModifiers (line 166) | @Override
method getSuperclass (line 171) | @Override
method getSuperclassGenerics (line 176) | @Override
method isConstructor (line 181) | private static boolean isConstructor(Method constructor) {
method main (line 185) | public static void main(String[] args) throws Exception {
class EmptyClassDef (line 195) | private static class EmptyClassDef implements ClassDef {
method getType (line 197) | @Override
method compareTo (line 202) | @Override
method getAccessFlags (line 207) | @Override
method getSuperclass (line 212) | @Override
method getInterfaces (line 217) | @Override
method getSourceFile (line 222) | @Override
method getAnnotations (line 227) | @Override
method getStaticFields (line 232) | @Override
method getInstanceFields (line 257) | @Override
method getFields (line 282) | @Override
method getDirectMethods (line 307) | @Override
method getVirtualMethods (line 332) | @Override
method getMethods (line 357) | @Override
method length (line 382) | @Override
method charAt (line 387) | @Override
method subSequence (line 392) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/dex/MultidexReader.java
class MultidexReader (line 36) | public class MultidexReader {
method MultidexReader (line 37) | private MultidexReader() {
method fillApkDashboard (line 40) | public static void fillApkDashboard(File binaryArchiveFile, ApkDashboa...
method readClassNamesFromMultidex (line 145) | public static void readClassNamesFromMultidex(File binaryArchiveFile,
method extractClassesDexWithClass (line 233) | public static File extractClassesDexWithClass(String className, File a...
method extractClassesDex (line 312) | public static File extractClassesDex(String dexName, File apkFile, Dex...
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/xml/AndroidXmlTranslator.java
class AndroidXmlTranslator (line 41) | public class AndroidXmlTranslator implements Translator {
method AndroidXmlTranslator (line 51) | public AndroidXmlTranslator(String xmlName, File archiveFile) {
method AndroidXmlTranslator (line 56) | public AndroidXmlTranslator(File archiveFile) {
method getClassName (line 60) | @Override
method addMapper (line 65) | @Override
method apply (line 70) | @Override
method closeResource (line 117) | private void closeResource(Closeable closeable) {
method getElementsList (line 130) | @Override
method getDependencies (line 135) | @Override
method toString (line 141) | @Override
method main (line 146) | public static void main(String[] args) throws Exception {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/xml/XmlDecompressor.java
class XmlDecompressor (line 46) | public class XmlDecompressor {
method setAppendNamespaces (line 111) | public void setAppendNamespaces(boolean appendNamespaces) {
method setAppendCData (line 115) | public void setAppendCData(boolean appendCData) {
method decompressXml (line 119) | public String decompressXml(byte[] bytes) throws IOException {
method decompressXml (line 125) | public String decompressXml(InputStream is) throws IOException {
method parseCDataTag (line 176) | private void parseCDataTag(StringBuilder sb, DataInput dis, List<Strin...
method parseEndTag (line 194) | private void parseEndTag(StringBuilder sb, DataInput dis, List<String>...
method parseStartTag (line 212) | private void parseStartTag(StringBuilder sb, DataInput dis, List<Strin...
method parseAttributes (line 231) | private void parseAttributes(StringBuilder sb, DataInput dis, List<Str...
method parseStrings (line 302) | private List<String> parseStrings(DataInput dis) throws IOException {
method parseUsingByteBuffer (line 334) | private static List<String> parseUsingByteBuffer(int chunkSize, int he...
method getUnsignedShort (line 370) | public static int getUnsignedShort(ByteBuffer bb) {
method getUnsignedByte (line 374) | public static int getUnsignedByte(ByteBuffer bb) {
method getUnsignedInt (line 378) | public static long getUnsignedInt(ByteBuffer bb) {
method getDimensionType (line 382) | private static String getDimensionType(int data) {
method getFractionType (line 394) | private static String getFractionType(int data) {
method resValue (line 405) | private static float resValue(int data) {
FILE: ClassySharkWS/src/com/google/classyshark/silverghost/translator/xml/XmlHighlighter.java
class XmlHighlighter (line 32) | public class XmlHighlighter {
type TagType (line 33) | public enum TagType {
class Element (line 68) | public static class Element implements Comparable<Element> {
method Element (line 73) | public Element(int start, int end, TagType tag) {
method toString (line 79) | @Override
method compareTo (line 88) | @Override
method getElements (line 94) | public List<Translator.ELEMENT> getElements(String xml) {
method main (line 145) | public static void main(String[] args) {
FILE: ClassySharkWS/src/com/google/classyshark/updater/UpdateManager.java
class UpdateManager (line 29) | public class UpdateManager{
method UpdateManager (line 32) | private UpdateManager() {
method getInstance (line 36) | public static UpdateManager getInstance() {
method checkVersionConsole (line 40) | public void checkVersionConsole() {
method checkVersionGui (line 44) | public void checkVersionGui() {
method checkVersion (line 48) | private void checkVersion(boolean isGui) {
method getDownloaderFrom (line 52) | private AbstractDownloader getDownloaderFrom(boolean isGui) {
FILE: ClassySharkWS/src/com/google/classyshark/updater/models/Release.java
class Release (line 29) | public class Release {
method Release (line 39) | private Release(String name, boolean preRelease, String body, ReleaseD...
method Release (line 47) | public Release() {
method equals (line 51) | @Override
method getMajorVersion (line 60) | private int getMajorVersion() {
method getVersionField (line 64) | private int getVersionField(int field) {
method getMinorVersion (line 69) | private int getMinorVersion() {
method hashCode (line 73) | @Override
method toString (line 78) | @Override
method isNewerThan (line 83) | public boolean isNewerThan(Release other) {
method getDownloadURL (line 88) | public String getDownloadURL() {
method getReleaseName (line 96) | public String getReleaseName() {
method isPreRelease (line 100) | public boolean isPreRelease() {
method getChangelog (line 104) | public String getChangelog() {
method getCreatedAt (line 108) | public String getCreatedAt() {
FILE: ClassySharkWS/src/com/google/classyshark/updater/models/ReleaseDownloadData.java
class ReleaseDownloadData (line 21) | class ReleaseDownloadData {
method ReleaseDownloadData (line 26) | ReleaseDownloadData(String browserDownloadUrl) {
method equals (line 30) | @Override
method hashCode (line 39) | @Override
method getURL (line 44) | String getURL() {
FILE: ClassySharkWS/src/com/google/classyshark/updater/networking/AbstractDownloader.java
class AbstractDownloader (line 31) | public abstract class AbstractDownloader extends AbstractReleaseCallback{
method checkNewVersion (line 34) | public void checkNewVersion() {
method onReleaseReceived (line 39) | @Override
method warnAboutNew (line 54) | abstract boolean warnAboutNew(Release release);
method obtainNew (line 56) | private void obtainNew(Release release) {
method onReleaseDownloaded (line 64) | abstract void onReleaseDownloaded(File file, Release release);
FILE: ClassySharkWS/src/com/google/classyshark/updater/networking/AbstractReleaseCallback.java
class AbstractReleaseCallback (line 24) | public abstract class AbstractReleaseCallback implements Callback<Release>{
method onResponse (line 26) | @Override
method onReleaseReceived (line 31) | public abstract void onReleaseReceived(Release release);
method onFailure (line 33) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/updater/networking/CliDownloader.java
class CliDownloader (line 28) | public class CliDownloader extends AbstractDownloader{
method CliDownloader (line 31) | private CliDownloader() {}
method warnAboutNew (line 33) | @Override
method onReleaseDownloaded (line 46) | @Override
method getInstance (line 58) | public static AbstractDownloader getInstance() {
FILE: ClassySharkWS/src/com/google/classyshark/updater/networking/GitHubApi.java
type GitHubApi (line 28) | public interface GitHubApi {
method getLatestRelease (line 32) | @GET("repos/google/android-classyshark/releases/latest")
FILE: ClassySharkWS/src/com/google/classyshark/updater/networking/GuiDownloader.java
class GuiDownloader (line 28) | public class GuiDownloader extends AbstractDownloader{
method GuiDownloader (line 31) | private GuiDownloader() {}
method warnAboutNew (line 33) | @Override
method onReleaseDownloaded (line 38) | @Override
method getInstance (line 43) | public static AbstractDownloader getInstance() {
FILE: ClassySharkWS/src/com/google/classyshark/updater/networking/MessageRunnable.java
class MessageRunnable (line 21) | class MessageRunnable implements Runnable {
method MessageRunnable (line 27) | MessageRunnable(String title, String changelog) {
method buildTitleFrom (line 32) | private String buildTitleFrom(String title) {
method buildChangelogFrom (line 36) | private String buildChangelogFrom(String changelog) {
method run (line 40) | @Override
FILE: ClassySharkWS/src/com/google/classyshark/updater/networking/NetworkManager.java
class NetworkManager (line 22) | public class NetworkManager {
method getGitHubApi (line 24) | public static GitHubApi getGitHubApi() {
FILE: ClassySharkWS/src/com/google/classyshark/updater/utils/FileUtils.java
class FileUtils (line 40) | public class FileUtils {
method downloadFileFrom (line 47) | public static File downloadFileFrom(Release release) throws IOException {
method obtainNewJarFrom (line 55) | private static void obtainNewJarFrom(Release release, File file) throw...
method overwriteOld (line 64) | private void overwriteOld(File file) throws IOException {
FILE: ClassySharkWS/src/com/google/classyshark/updater/utils/NamingUtils.java
class NamingUtils (line 23) | public class NamingUtils {
method buildNameFrom (line 30) | static String buildNameFrom(Release release) {
method extractCurrentPath (line 40) | static String extractCurrentPath() {
FILE: Samples/SampleGradle/src/main/java/Main.java
class Main (line 20) | public class Main {
method main (line 21) | public static void main(String[] args) {
Condensed preview — 172 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (603K chars).
[
{
"path": ".gitignore",
"chars": 577,
"preview": ".gradle/\n\nClassySharkWS/.gradle/\n\nClassySharkWS/build/\n\nClassySharkAndroid/.idea/\n\nClassySharkAndroid/out/\n\nClassySharkA"
},
{
"path": "CONTRIB.md",
"chars": 1612,
"preview": "# How to become a contributor and submit your own code\n\n## Contributor License Agreements\n\nWe'd love to accept your samp"
},
{
"path": "ClassySharkAndroid/.gitignore",
"chars": 91,
"preview": ".gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n"
},
{
"path": "ClassySharkAndroid/ClassySharkAndroid.iml",
"chars": 949,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module external.linked.project.id=\"ClassySharkAndroid\" external.linked.project.p"
},
{
"path": "ClassySharkAndroid/app/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "ClassySharkAndroid/app/build.gradle",
"chars": 672,
"preview": "apply plugin: 'com.android.application'\n\nandroid {\n compileSdkVersion 23\n buildToolsVersion '25.0.0'\n\n defaultC"
},
{
"path": "ClassySharkAndroid/app/proguard-rules.pro",
"chars": 673,
"preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /U"
},
{
"path": "ClassySharkAndroid/app/src/androidTest/java/com/google/classysharkandroid/activities/classysharkandroid/ApplicationTest.java",
"chars": 390,
"preview": "package com.google.classysharkandroid.activities.classysharkandroid;\n\nimport android.app.Application;\nimport android.tes"
},
{
"path": "ClassySharkAndroid/app/src/main/AndroidManifest.xml",
"chars": 3620,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "ClassySharkAndroid/app/src/main/assets/prettify.css",
"chars": 695,
"preview": ".str{color:#EC7600}.kwd{color:#93C763}.com{color:#66747B}.typ{color:#678CB1}.lit{color:#FACD22}.pun{color:#F1F2F3}.pln{c"
},
{
"path": "ClassySharkAndroid/app/src/main/assets/prettify.js",
"chars": 14551,
"preview": "!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;\n(function(){function S(a){function d(e){var b=e.charCodeAt("
},
{
"path": "ClassySharkAndroid/app/src/main/assets/run_prettify.js",
"chars": 16577,
"preview": "!function(){var r=null;\n(function(){function X(e){function j(){try{J.doScroll(\"left\")}catch(e){P(j,50);return}w(\"poll\")}"
},
{
"path": "ClassySharkAndroid/app/src/main/assets/sons-of-obsidian.css",
"chars": 695,
"preview": ".str{color:#EC7600}.kwd{color:#93C763}.com{color:#66747B}.typ{color:#678CB1}.lit{color:#FACD22}.pun{color:#F1F2F3}.pln{c"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/activities/ClassesListActivity.java",
"chars": 8069,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/activities/MainActivity.java",
"chars": 4680,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/activities/SourceViewerActivity.java",
"chars": 3412,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/adapters/StableArrayAdapter.java",
"chars": 1387,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/dex/DexLoaderBuilder.java",
"chars": 3387,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/ClassTypeAlgorithm.java",
"chars": 2459,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/ClassesNamesList.java",
"chars": 1087,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/Reflector.java",
"chars": 8897,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/utils/IOUtils.java",
"chars": 2026,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/utils/UriUtils.java",
"chars": 1142,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkAndroid/app/src/main/res/layout/activity_classes_list.xml",
"chars": 737,
"preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/t"
},
{
"path": "ClassySharkAndroid/app/src/main/res/layout/activity_main.xml",
"chars": 733,
"preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/t"
},
{
"path": "ClassySharkAndroid/app/src/main/res/layout/activity_source_viewer.xml",
"chars": 445,
"preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:id=\"@+id/holder\"\n android:layo"
},
{
"path": "ClassySharkAndroid/app/src/main/res/menu/menu_main.xml",
"chars": 411,
"preview": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:app=\"http://schemas.android.com/apk/res-auto\""
},
{
"path": "ClassySharkAndroid/app/src/main/res/menu/menu_source_viewer.xml",
"chars": 419,
"preview": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:app=\"http://schemas.android.com/apk/res-auto\""
},
{
"path": "ClassySharkAndroid/app/src/main/res/values/dimens.xml",
"chars": 211,
"preview": "<resources>\n <!-- Default screen margins, per the Android Design guidelines. -->\n <dimen name=\"activity_horizontal"
},
{
"path": "ClassySharkAndroid/app/src/main/res/values/strings.xml",
"chars": 319,
"preview": "<resources>\n <string name=\"app_name\">ClassySharkAndroid</string>\n\n <string name=\"hello_world\">Hello world!</string"
},
{
"path": "ClassySharkAndroid/app/src/main/res/values/styles.xml",
"chars": 195,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
},
{
"path": "ClassySharkAndroid/app/src/main/res/values-w820dp/dimens.xml",
"chars": 358,
"preview": "<resources>\n <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n (such as s"
},
{
"path": "ClassySharkAndroid/app/src/test/java/com/classysharkandroid/ExampleUnitTest.java",
"chars": 358,
"preview": "package com.apisolutions.classysharkandroid.activities.classysharkandroid;\n\nimport org.junit.Test;\n\nimport static org.ju"
},
{
"path": "ClassySharkAndroid/build.gradle",
"chars": 504,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n r"
},
{
"path": "ClassySharkAndroid/settings.gradle",
"chars": 15,
"preview": "include ':app'\n"
},
{
"path": "ClassySharkAndroid/snap/snapcraft.yaml",
"chars": 916,
"preview": "name: android-classyshark\nversion: '8.2'\nsummary: Binary analysis of any Android/Java based app/APK/game.\ndescription: |"
},
{
"path": "ClassySharkWS/build.gradle",
"chars": 1718,
"preview": "group 'classyshark'\nversion '1.0-SNAPSHOT'\n\napply plugin: 'java'\napply plugin: 'java-library-distribution' // task: grad"
},
{
"path": "ClassySharkWS/gradlew",
"chars": 5296,
"preview": "#!/usr/bin/env sh\n\n##############################################################################\n##\n## Gradle start up"
},
{
"path": "ClassySharkWS/gradlew.bat",
"chars": 2260,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@r"
},
{
"path": "ClassySharkWS/src/META-INF/MANIFEST.MF",
"chars": 66,
"preview": "Manifest-Version: 1.0\r\nMain-Class: com.google.classyshark.Main\r\n\r\n"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/Main.java",
"chars": 1362,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/Shark.java",
"chars": 2945,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/Version.java",
"chars": 792,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/analytics/Analytics.java",
"chars": 1125,
"preview": "/*\n * Copyright 2017 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/analytics/FocusPoint.java",
"chars": 2950,
"preview": "/*\n * Copyright 2015 Siddique Hameed\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/analytics/GoogleAnalytics_v1_URLBuildingStrategy.java",
"chars": 4210,
"preview": "/*\n * Copyright 2015 Siddique Hameed\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/analytics/HTTPGetMethod.java",
"chars": 3365,
"preview": "/*\n * Copyright 2015 Siddique Hameed\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/analytics/JGoogleAnalyticsTracker.java",
"chars": 4486,
"preview": "/*\n * Copyright 2015 Siddique Hameed\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/analytics/LoggingAdapter.java",
"chars": 929,
"preview": "/*\n * Copyright 2015 Siddique Hameed\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/analytics/URLBuildingStrategy.java",
"chars": 886,
"preview": "/*\n * Copyright 2015 Siddique Hameed\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/cli/CliMode.java",
"chars": 2905,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/GuiMode.java",
"chars": 3012,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/ArchiveDisplayer.java",
"chars": 733,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/ClassySharkPanel.java",
"chars": 18049,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/FileTransferHandler.java",
"chars": 2483,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/ViewerController.java",
"chars": 1008,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/chart/RingChart.java",
"chars": 9779,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/chart/RingChartPanel.java",
"chars": 3681,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/BatchDocument.java",
"chars": 1995,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/DisplayArea.java",
"chars": 16700,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/IDisplayArea.java",
"chars": 1287,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/ChristmasBG.java",
"chars": 2393,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/Doodle.java",
"chars": 753,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/SanFranBG.java",
"chars": 2825,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/SharkBG.java",
"chars": 3313,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/io/CurrentFolderConfig.java",
"chars": 2167,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/io/FileChooserUtils.java",
"chars": 1407,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/io/RecentArchivesConfig.java",
"chars": 3614,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/methodscount/MethodsCountPanel.java",
"chars": 4988,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/reducer/Reducer.java",
"chars": 2395,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/toolbar/KeyUtils.java",
"chars": 1363,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/toolbar/RecentArchivesButton.java",
"chars": 4287,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/toolbar/Toolbar.java",
"chars": 7975,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/toolbar/ToolbarController.java",
"chars": 1074,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/tree/CellRenderer.java",
"chars": 1059,
"preview": "package com.google.classyshark.gui.panel.tree;\n\nimport com.google.classyshark.gui.GuiMode;\n\nimport javax.swing.JTree;\nim"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/tree/FilesTree.java",
"chars": 11651,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/panel/tree/NodeInfo.java",
"chars": 1142,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/settings/SettingsFrame.java",
"chars": 1890,
"preview": "package com.google.classyshark.gui.settings;\n\nimport com.google.classyshark.gui.GuiMode;\nimport com.google.classyshark.g"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/settings/ThemeChosenListener.java",
"chars": 801,
"preview": "package com.google.classyshark.gui.settings;\n\nimport com.google.classyshark.gui.theme.Theme;\nimport com.google.classysha"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/theme/SwingThemeApplier.java",
"chars": 110,
"preview": "package com.google.classyshark.gui.theme;\n\ninterface SwingThemeApplier<T> {\n\n void applyTo(T component);\n}\n"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/theme/Theme.java",
"chars": 784,
"preview": "package com.google.classyshark.gui.theme;\n\nimport javax.swing.ImageIcon;\nimport java.awt.Color;\nimport java.awt.Componen"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/theme/ThemeManager.java",
"chars": 2191,
"preview": "package com.google.classyshark.gui.theme;\n\nimport com.google.classyshark.gui.theme.dark.DarkTheme;\nimport com.google.cla"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/theme/dark/DarkColorScheme.java",
"chars": 619,
"preview": "package com.google.classyshark.gui.theme.dark;\n\nimport java.awt.Color;\n\nclass DarkColorScheme {\n\n private DarkColorSc"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/theme/dark/DarkIconScheme.java",
"chars": 827,
"preview": "package com.google.classyshark.gui.theme.dark;\n\npublic class DarkIconScheme {\n\n private static final String ROOT_PATH"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/theme/dark/DarkTheme.java",
"chars": 4772,
"preview": "package com.google.classyshark.gui.theme.dark;\n\nimport com.google.classyshark.gui.theme.Theme;\n\nimport javax.swing.Image"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/theme/light/LightColorScheme.java",
"chars": 1124,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/theme/light/LightIconScheme.java",
"chars": 823,
"preview": "package com.google.classyshark.gui.theme.light;\n\n\nclass LightIconScheme {\n\n private static final String ROOT_PATH = \""
},
{
"path": "ClassySharkWS/src/com/google/classyshark/gui/theme/light/LightTheme.java",
"chars": 3859,
"preview": "package com.google.classyshark.gui.theme.light;\n\nimport com.google.classyshark.gui.theme.Theme;\n\nimport javax.swing.Imag"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/FullArchiveReader.java",
"chars": 873,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/SilverGhost.java",
"chars": 6918,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/SilverGhostFacade.java",
"chars": 7205,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/TokensMapper.java",
"chars": 806,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/BinaryContentReader.java",
"chars": 835,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/ContentReader.java",
"chars": 2981,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/aar/AarReader.java",
"chars": 2869,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/apk/ApkReader.java",
"chars": 1768,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/clazz/ClassNameVisitor.java",
"chars": 1160,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/clazz/ClazzReader.java",
"chars": 2018,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/dex/DexReader.java",
"chars": 2410,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/dex/DexlibLoader.java",
"chars": 507,
"preview": "package com.google.classyshark.silverghost.contentreader.dex;\n\nimport java.io.File;\nimport org.jf.dexlib2.DexFileFactory"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/contentreader/jar/JarReader.java",
"chars": 3294,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/exporter/Exporter.java",
"chars": 5216,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/exporter/FlatMethodCountExporter.java",
"chars": 1702,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/exporter/MethodCountExporter.java",
"chars": 808,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/exporter/TreeMethodCountExporter.java",
"chars": 2491,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/io/SherlockHash.java",
"chars": 2200,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/methodscounter/ClassInfo.java",
"chars": 1031,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/methodscounter/ClassNode.java",
"chars": 1964,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/methodscounter/RootBuilder.java",
"chars": 6638,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/plugins/EmptyFullArchiveReader.java",
"chars": 1733,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/plugins/IdentityMapper.java",
"chars": 1131,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/Translator.java",
"chars": 1521,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/TranslatorFactory.java",
"chars": 3054,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/ApkTranslator.java",
"chars": 2234,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/ApkDashboard.java",
"chars": 7047,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/ApkNativeMethodsVisitor.java",
"chars": 2220,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/ClassesDexDataEntry.java",
"chars": 1838,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/DynamicSymbolsInspector.java",
"chars": 1487,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/JavaDependenciesInspector.java",
"chars": 4775,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/PrivateNativeLibsInspector.java",
"chars": 1886,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/SyntheticAccessorsInspector.java",
"chars": 2006,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/Table.java",
"chars": 9034,
"preview": "/**\n * Copyright (C) 2014 ned.twigg@diffplug.com\n * Copyright (C) 2011 K Venkata Sudhakar <kvenkatasudhakar@gmail.com>\n "
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/manifest/AndroidManifestPlainTextReader.java",
"chars": 4285,
"preview": "/*\n * Copyright 2017 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/manifest/ManifestInspector.java",
"chars": 1517,
"preview": "/*\n * Copyright 2017 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/apk/dashboard/manifest/ReceiverActionsBL.java",
"chars": 3600,
"preview": "/*\n * Copyright 2017 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/dex/DexInfoTranslator.java",
"chars": 3974,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/dex/DexMethodsDumper.java",
"chars": 6497,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/dex/DexStringsDumper.java",
"chars": 3031,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/elf/ElfReader.java",
"chars": 16767,
"preview": "/*\n * Copyright (C) 2011 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/elf/ElfTranslator.java",
"chars": 4185,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/jar/JarInfoTranslator.java",
"chars": 2368,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/JavaTranslator.java",
"chars": 15406,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/MetaObject.java",
"chars": 3283,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/MetaObjectFactory.java",
"chars": 6280,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/MetaObjectWithMapper.java",
"chars": 2534,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/StressTest.java",
"chars": 2728,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/QualifiedTypesMap.java",
"chars": 3106,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/asm/ClassBytesFromJarExtractor.java",
"chars": 3238,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/asm/ClassDetailsFiller.java",
"chars": 7285,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/asm/MetaObjectAsmClass.java",
"chars": 4180,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/reflect/ClassUtils.java",
"chars": 1292,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/clazz/reflect/MetaObjectClass.java",
"chars": 8887,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/dex/DexlibAdapter.java",
"chars": 2781,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/dex/MetaObjectDex.java",
"chars": 11921,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/java/dex/MultidexReader.java",
"chars": 14787,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/xml/AndroidXmlTranslator.java",
"chars": 4765,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/xml/XmlDecompressor.java",
"chars": 16308,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/silverghost/translator/xml/XmlHighlighter.java",
"chars": 6948,
"preview": "/*\n * Copyright 2015 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/UpdateManager.java",
"chars": 1820,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/models/Release.java",
"chars": 3247,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/models/ReleaseDownloadData.java",
"chars": 1335,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/networking/AbstractDownloader.java",
"chars": 2129,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/networking/AbstractReleaseCallback.java",
"chars": 1215,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/networking/CliDownloader.java",
"chars": 1947,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/networking/GitHubApi.java",
"chars": 1071,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/networking/GuiDownloader.java",
"chars": 1445,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/networking/MessageRunnable.java",
"chars": 1586,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/networking/NetworkManager.java",
"chars": 1054,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/utils/FileUtils.java",
"chars": 2551,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "ClassySharkWS/src/com/google/classyshark/updater/utils/NamingUtils.java",
"chars": 1388,
"preview": "/*\n * Copyright 2016 Google, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "NOTICE",
"chars": 594,
"preview": "This sample uses the following software:\n\nCopyright 2015, Google Inc.\n\nLicensed under the Apache License, Version 2.0 (t"
},
{
"path": "README.md",
"chars": 2943,
"preview": "# ClassyShark\n\n### Introduction\n\n in your build/conti"
},
{
"path": "Samples/SampleGradle/README.md",
"chars": 63,
"preview": "# ClassyShark Gradle plugin\n\n\n\n"
},
{
"path": "Samples/SampleGradle/build.gradle",
"chars": 325,
"preview": "apply plugin: 'java'\napply plugin: 'application'\n\nrepositories {\n flatDir {\n dirs 'libs'\n }\n}\n\ndependencies"
},
{
"path": "Samples/SampleGradle/gradlew",
"chars": 5080,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "Samples/SampleGradle/gradlew.bat",
"chars": 2314,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "Samples/SampleGradle/src/main/java/Main.java",
"chars": 1293,
"preview": "/*\r\n * Copyright 2016 Google, Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may n"
},
{
"path": "third_party/ASMDEX.LICENSE",
"chars": 1531,
"preview": "Software Name : AsmDex\nVersion : 1.0\n\nCopyright © 2012 France Télécom\nAll rights reserved.\n\nRedistribution and use in so"
},
{
"path": "third_party/java-binutils.LICENSE",
"chars": 11231,
"preview": "Eclipse Public License - v 1.0\n\nTHE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (\"AG"
}
]
About this extraction
This page contains the full source code of the google/android-classyshark GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 172 files (550.5 KB), approximately 134.5k tokens, and a symbol index with 997 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.