public class Libs
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Libs.ActivityStyle |
static class |
Libs.LibraryFields |
static class |
Libs.SpecialButton |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUNDLE_COLORS |
static java.lang.String |
BUNDLE_STYLE |
static java.lang.String |
BUNDLE_THEME |
static java.lang.String |
BUNDLE_TITLE |
| Constructor and Description |
|---|
Libs(android.content.Context context) |
Libs(android.content.Context context,
java.lang.String[] fields) |
| Modifier and Type | Method and Description |
|---|---|
java.util.ArrayList<Library> |
findInExternalLibrary(java.lang.String searchTerm,
boolean idOnly,
int limit) |
java.util.ArrayList<Library> |
findInInternalLibrary(java.lang.String searchTerm,
boolean idOnly,
int limit) |
java.util.ArrayList<Library> |
findLibrary(java.lang.String searchTerm,
int limit)
Find a library by a searchTerm (Limit the results if there are more than one)
|
java.util.List<Library> |
getAutoDetectedLibraries(android.content.Context ctx,
boolean checkCachedDetection)
Get all autoDetected Libraries
|
java.util.HashMap<java.lang.String,java.lang.String> |
getCustomVariables(android.content.Context ctx,
java.lang.String libraryName) |
java.util.ArrayList<Library> |
getExternLibraries()
Get all extern available Libraries
|
java.util.ArrayList<Library> |
getInternLibraries()
Get all intern available Libraries
|
java.util.ArrayList<Library> |
getLibraries()
Get all available Libraries
|
Library |
getLibrary(java.lang.String libraryName)
Get a library by its name (the name must be equal)
|
License |
getLicense(java.lang.String licenseName) |
java.util.ArrayList<License> |
getLicenses()
Get all available licenses
|
java.lang.String |
getStringResourceByName(android.content.Context ctx,
java.lang.String aString) |
java.lang.String |
insertVariables(java.lang.String insertInto,
java.util.HashMap<java.lang.String,java.lang.String> variables) |
void |
modifyLibraries(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> modifications) |
java.util.ArrayList<Library> |
prepareLibraries(android.content.Context ctx,
java.lang.String[] internalLibraries,
java.lang.String[] excludeLibraries,
boolean autoDetect,
boolean checkCachedDetection,
boolean sort)
This will summarize all libraries and elimate duplicates
|
static java.lang.String[] |
toStringArray(java.lang.reflect.Field[] fields)
A helper method to get a String[] out of a fieldArray
|
public static final java.lang.String BUNDLE_THEME
public static final java.lang.String BUNDLE_TITLE
public static final java.lang.String BUNDLE_STYLE
public static final java.lang.String BUNDLE_COLORS
public Libs(android.content.Context context)
public Libs(android.content.Context context,
java.lang.String[] fields)
public static java.lang.String[] toStringArray(java.lang.reflect.Field[] fields)
fields - R.strings.class.getFields()public java.util.ArrayList<Library> prepareLibraries(android.content.Context ctx, java.lang.String[] internalLibraries, java.lang.String[] excludeLibraries, boolean autoDetect, boolean checkCachedDetection, boolean sort)
internalLibraries - the String[] with the internalLibraries (if set manual)excludeLibraries - the String[] with the libs to be excludedautoDetect - defines if the libraries should be resolved by their classpath (if possible)checkCachedDetection - defines if we should check the cached autodetected libraries (per version) (default: enabled)sort - defines if the array should be sortedpublic java.util.List<Library> getAutoDetectedLibraries(android.content.Context ctx, boolean checkCachedDetection)
ctx - the current contextcheckCachedDetection - defines if we should check the cached autodetected libraries (per version) (default: enabled)public java.util.ArrayList<Library> getInternLibraries()
public java.util.ArrayList<Library> getExternLibraries()
public java.util.ArrayList<License> getLicenses()
public java.util.ArrayList<Library> getLibraries()
public Library getLibrary(java.lang.String libraryName)
libraryName - the name of the lib (NOT case sensitiv) or the real name of the lib (this is the name used for github)public java.util.ArrayList<Library> findLibrary(java.lang.String searchTerm, int limit)
searchTerm - the term which is in the libs name (NOT case sensitiv) or the real name of the lib (this is the name used for github)limit - -1 for all results or smaller 0 for a limitted resultpublic java.util.ArrayList<Library> findInInternalLibrary(java.lang.String searchTerm, boolean idOnly, int limit)
searchTerm - idOnly - limit - public java.util.ArrayList<Library> findInExternalLibrary(java.lang.String searchTerm, boolean idOnly, int limit)
searchTerm - idOnly - limit - public License getLicense(java.lang.String licenseName)
licenseName - public java.util.HashMap<java.lang.String,java.lang.String> getCustomVariables(android.content.Context ctx,
java.lang.String libraryName)
libraryName - public java.lang.String insertVariables(java.lang.String insertInto,
java.util.HashMap<java.lang.String,java.lang.String> variables)
public java.lang.String getStringResourceByName(android.content.Context ctx,
java.lang.String aString)
public void modifyLibraries(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> modifications)
modifications -