#823 - Adding OkHttp dependency. Initial setup of JavaFileSource as a singleton class.
This commit is contained in:
@@ -31,6 +31,7 @@ dependencies {
|
||||
compile 'commons-validator:commons-validator:1.4.1'
|
||||
compile 'com.android.support:support-annotations:21.0.3'
|
||||
compile 'com.android.support:support-v4:21.0.3'
|
||||
compile 'com.squareup.okhttp:okhttp:2.2.0'
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.mapbox.mapboxgl.lib.util;
|
||||
|
||||
public class JavaFileSource {
|
||||
|
||||
private static JavaFileSource instance = null;
|
||||
|
||||
/**
|
||||
* Private Constructor to support Singleton pattern
|
||||
*/
|
||||
private JavaFileSource() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the singleton instance of JavaFileSource
|
||||
* @return Reference to the Singleton Instance of JavaFileSource
|
||||
*/
|
||||
public static JavaFileSource getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new JavaFileSource();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user