Created
October 15, 2015 11:45
-
-
Save mziccard/bd575d27f78124e1ce7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Decompiled with CFR 0_102. | |
* | |
* Could not load the following classes: | |
* com.google.api.client.googleapis.auth.oauth2.GoogleCredential | |
* com.google.api.client.googleapis.compute.ComputeCredential | |
* com.google.api.client.googleapis.javanet.GoogleNetHttpTransport | |
* com.google.api.client.http.HttpRequestInitializer | |
* com.google.api.client.http.HttpTransport | |
* com.google.api.client.http.javanet.NetHttpTransport | |
* com.google.api.client.json.JsonFactory | |
* com.google.api.client.json.jackson.JacksonFactory | |
* com.google.gcloud.AuthCredentials$AppEngineAuthCredentials | |
* com.google.gcloud.AuthCredentials$ApplicationDefaultAuthCredentials | |
* com.google.gcloud.AuthCredentials$ComputeEngineAuthCredentials | |
* com.google.gcloud.AuthCredentials$ServiceAccountAuthCredentials | |
* net.sourceforge.cobertura.coveragedata.LightClassmapListener | |
* net.sourceforge.cobertura.coveragedata.TouchCollector | |
*/ | |
package com.google.gcloud; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; | |
import com.google.api.client.googleapis.compute.ComputeCredential; | |
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; | |
import com.google.api.client.http.HttpRequestInitializer; | |
import com.google.api.client.http.HttpTransport; | |
import com.google.api.client.http.javanet.NetHttpTransport; | |
import com.google.api.client.json.JsonFactory; | |
import com.google.api.client.json.jackson.JacksonFactory; | |
import com.google.gcloud.AuthCredentials; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.Serializable; | |
import java.security.GeneralSecurityException; | |
import java.security.PrivateKey; | |
import java.util.Set; | |
import net.sourceforge.cobertura.coveragedata.LightClassmapListener; | |
import net.sourceforge.cobertura.coveragedata.TouchCollector; | |
/* | |
* Exception performing whole class analysis ignored. | |
*/ | |
public abstract class AuthCredentials | |
implements Serializable { | |
public static final transient int[] __cobertura_counters; | |
private static final long serialVersionUID = 236297804453464604L; | |
public AuthCredentials() { | |
} | |
protected abstract HttpRequestInitializer httpRequestInitializer(HttpTransport var1, Set<String> var2); | |
public static AuthCredentials createForAppEngine() { | |
AuthCredentials.__cobertura_init(); | |
int n = 0; | |
int[] arrn = __cobertura_counters; | |
arrn[1] = arrn[1] + 1; | |
return AppEngineAuthCredentials.access$000(); | |
} | |
public static AuthCredentials createForComputeEngine() throws IOException, GeneralSecurityException { | |
AuthCredentials.__cobertura_init(); | |
int n = 0; | |
int[] arrn = __cobertura_counters; | |
arrn[2] = arrn[2] + 1; | |
return new ComputeEngineAuthCredentials(); | |
} | |
public static AuthCredentials createApplicationDefaults() throws IOException { | |
AuthCredentials.__cobertura_init(); | |
int n = 0; | |
int[] arrn = __cobertura_counters; | |
arrn[3] = arrn[3] + 1; | |
return new ApplicationDefaultAuthCredentials(); | |
} | |
public static ServiceAccountAuthCredentials createFor(String string, PrivateKey privateKey) { | |
void privateKey2; | |
String account; | |
AuthCredentials.__cobertura_init(); | |
int n = 0; | |
int[] arrn = __cobertura_counters; | |
arrn[4] = arrn[4] + 1; | |
return new ServiceAccountAuthCredentials(account, (PrivateKey)privateKey2); | |
} | |
public static ServiceAccountAuthCredentials createForJson(InputStream inputStream) throws IOException { | |
InputStream jsonCredentialStream; | |
AuthCredentials.__cobertura_init(); | |
int n = 0; | |
int[] arrn = __cobertura_counters; | |
arrn[5] = arrn[5] + 1; | |
GoogleCredential tempCredentials = GoogleCredential.fromStream((InputStream)jsonCredentialStream); | |
int[] arrn2 = __cobertura_counters; | |
arrn2[6] = arrn2[6] + 1; | |
return new ServiceAccountAuthCredentials(tempCredentials.getServiceAccountId(), tempCredentials.getServiceAccountPrivateKey()); | |
} | |
public static AuthCredentials noCredentials() { | |
AuthCredentials.__cobertura_init(); | |
int n = 0; | |
int[] arrn = __cobertura_counters; | |
arrn[7] = arrn[7] + 1; | |
return ServiceAccountAuthCredentials.access$100(); | |
} | |
static ComputeCredential getComputeCredential() throws IOException, GeneralSecurityException { | |
AuthCredentials.__cobertura_init(); | |
int n = 0; | |
int[] arrn = __cobertura_counters; | |
arrn[8] = arrn[8] + 1; | |
NetHttpTransport transport = GoogleNetHttpTransport.newTrustedTransport(); | |
int[] arrn2 = __cobertura_counters; | |
arrn2[9] = arrn2[9] + 1; | |
ComputeCredential credential = new ComputeCredential((HttpTransport)transport, (JsonFactory)new JacksonFactory()); | |
int[] arrn3 = __cobertura_counters; | |
arrn3[10] = arrn3[10] + 1; | |
credential.refreshToken(); | |
int[] arrn4 = __cobertura_counters; | |
arrn4[11] = arrn4[11] + 1; | |
return credential; | |
} | |
static { | |
AuthCredentials.__cobertura_init(); | |
} | |
public static void __cobertura_init() { | |
if (__cobertura_counters == null) { | |
__cobertura_counters = new int[12]; | |
TouchCollector.registerClass((String)"com/google/gcloud/AuthCredentials"); | |
} | |
} | |
public static void __cobertura_classmap_0(LightClassmapListener lightClassmapListener) { | |
LightClassmapListener lightClassmapListener2 = lightClassmapListener; | |
lightClassmapListener2.putLineTouchPoint(174, 1, "createForAppEngine", "()Lcom/google/gcloud/AuthCredentials;"); | |
lightClassmapListener2.putLineTouchPoint(179, 2, "createForComputeEngine", "()Lcom/google/gcloud/AuthCredentials;"); | |
lightClassmapListener2.putLineTouchPoint(195, 3, "createApplicationDefaults", "()Lcom/google/gcloud/AuthCredentials;"); | |
lightClassmapListener2.putLineTouchPoint(211, 4, "createFor", "(Ljava/lang/String;Ljava/security/PrivateKey;)Lcom/google/gcloud/AuthCredentials$ServiceAccountAuthCredentials;"); | |
lightClassmapListener2.putLineTouchPoint(228, 5, "createForJson", "(Ljava/io/InputStream;)Lcom/google/gcloud/AuthCredentials$ServiceAccountAuthCredentials;"); | |
lightClassmapListener2.putLineTouchPoint(229, 6, "createForJson", "(Ljava/io/InputStream;)Lcom/google/gcloud/AuthCredentials$ServiceAccountAuthCredentials;"); | |
lightClassmapListener2.putLineTouchPoint(234, 7, "noCredentials", "()Lcom/google/gcloud/AuthCredentials;"); | |
lightClassmapListener2.putLineTouchPoint(238, 8, "getComputeCredential", "()Lcom/google/api/client/googleapis/compute/ComputeCredential;"); | |
lightClassmapListener2.putLineTouchPoint(240, 9, "getComputeCredential", "()Lcom/google/api/client/googleapis/compute/ComputeCredential;"); | |
lightClassmapListener2.putLineTouchPoint(242, 10, "getComputeCredential", "()Lcom/google/api/client/googleapis/compute/ComputeCredential;"); | |
lightClassmapListener2.putLineTouchPoint(243, 11, "getComputeCredential", "()Lcom/google/api/client/googleapis/compute/ComputeCredential;"); | |
} | |
public static void __cobertura_classmap(LightClassmapListener lightClassmapListener) { | |
LightClassmapListener lightClassmapListener2 = lightClassmapListener; | |
lightClassmapListener2.setClazz("com/google/gcloud/AuthCredentials"); | |
lightClassmapListener2.setSource("AuthCredentials.java"); | |
AuthCredentials.__cobertura_classmap_0(lightClassmapListener2); | |
} | |
public static int[] __cobertura_get_and_reset_counters() { | |
int[] arrn = __cobertura_counters; | |
__cobertura_counters = new int[__cobertura_counters.length]; | |
return arrn; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment