@Override public Void call() throws Exception { processor.processFile(rootFolder, file); return null; } });
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (mJumboMode ? 1 : 0); return result; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof DexKey)) { return false; } if (!super.equals(o)) { return false; } DexKey dexKey = (DexKey) o; if (mJumboMode != dexKey.mJumboMode) { return false; } return true; }
@Nullable @Override protected Node createItemNode( @NonNull Document document, @NonNull DxDexKey itemKey, @NonNull BaseItem item) throws IOException { Node itemNode = super.createItemNode(document, itemKey, item); if (itemNode != null) { itemKey.writeFieldsToXml(itemNode); } return itemNode; }
/** * Loads the stored item. This can be called several times (per subproject), so only * the first call should do something. */ public synchronized void load(@NonNull File itemStorage) { if (mLoaded) { return; } loadItems(itemStorage); mLoaded = true; }
public static Key of(@NonNull File sourceFile, @NonNull Revision buildToolsRevision) { return new Key(sourceFile, buildToolsRevision); }
public void search(@NonNull SourceFileProcessor processor) throws ProcessException, LoggedErrorException, InterruptedException, IOException { for (File file : mSourceFolders) { // pass both the root folder (the source folder) and the file/folder to process, // in this case the source folder as well. processFile(file, file, processor); } if (mExecutor != null) { mExecutor.waitForTasksWithQuickFail(true /*cancelRemaining*/); } }
@Override public int hashCode() { return Objects.hashCode(super.hashCode(), toolUsed, minApiName, additionalParameters); } }
@NonNull @Override public ProcessResult rethrowFailure() throws ProcessException { return assertNormalExitValue(); } }
@Override public String toString() { return MoreObjects.toStringHelper(this) .add("dexKey", super.toString()) .add("mAdditionalParameters", mAdditionalParameters) .add("mIsMultiDex", mIsMultiDex) .toString(); } }
/** * Removes a cached item if exists and calls a {@link #getItem}. * This can happen when the generated files was removed by an external event. * @param itemKey the key of the item to re-generate */ synchronized Pair<Item, Boolean> regenerateItem(@NonNull ILogger logger, @NonNull T itemKey) { mMap.remove(itemKey); return getItem(logger, itemKey); }
static DexKey of(@NonNull File sourceFile, @NonNull FullRevision buildToolsRevision, boolean jumboMode) { return new DexKey(sourceFile, buildToolsRevision, jumboMode); }
@Override public Key of(@NonNull File sourceFile, @NonNull FullRevision revision, @NonNull NamedNodeMap attrMap) { return Key.of(sourceFile, revision); } };
@Override public Void call() throws Exception { processor.processFile(rootFolder, file); return null; } });
@Override public int hashCode() { return Objects.hashCode(super.hashCode(), mJumboMode, mOptimize); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } DexKey dexKey = (DexKey) o; return mJumboMode == dexKey.mJumboMode && mOptimize == dexKey.mOptimize; }
/** * Loads the stored item. This can be called several times (per subproject), so only * the first call should do something. */ public synchronized void load(@NonNull File itemStorage) { if (mLoaded) { return; } loadItems(itemStorage); mLoaded = true; }
public static Key of(@NonNull File sourceFile, @NonNull FullRevision buildToolsRevision) { return new Key(sourceFile, buildToolsRevision); }
public void search(@NonNull SourceFileProcessor processor) throws ProcessException, LoggedErrorException, InterruptedException, IOException { for (File file : mSourceFolders) { // pass both the root folder (the source folder) and the file/folder to process, // in this case the source folder as well. processFile(file, file, processor); } if (mExecutor != null) { mExecutor.waitForTasksWithQuickFail(true /*cancelRemaining*/); } }
@Override public int hashCode() { return Objects.hashCode(super.hashCode(), mAdditionalParameters, mIsMultiDex); }