summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.xml77
-rw-r--r--jill-api/.checkstyle13
-rw-r--r--jill-api/.classpath12
-rw-r--r--jill-api/.project29
-rw-r--r--jill-api/.settings/edu.umd.cs.findbugs.core.prefs134
-rw-r--r--jill-api/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--jill-api/.settings/org.eclipse.jdt.apt.core.prefs4
-rw-r--r--jill-api/.settings/org.eclipse.jdt.core.prefs426
-rw-r--r--jill-api/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--jill-api/.settings/org.eclipse.ltk.core.refactoring.prefs2
-rw-r--r--jill-api/MODULE_LICENSE_APACHE20
-rw-r--r--jill-api/NOTICE176
-rw-r--r--jill-api/jackstyle.xml314
-rw-r--r--jill-api/src/com/android/jill/api/ConfigNotSupportedException.java42
-rw-r--r--jill-api/src/com/android/jill/api/JillConfig.java23
-rw-r--r--jill-api/src/com/android/jill/api/JillProvider.java141
-rw-r--r--jill-api/src/com/android/jill/api/example/WithServiceLoader.java103
-rw-r--r--jill-api/src/com/android/jill/api/v01/Api01Config.java64
-rw-r--r--jill-api/src/com/android/jill/api/v01/Api01TranslationTask.java31
-rw-r--r--jill-api/src/com/android/jill/api/v01/ConfigurationException.java38
-rw-r--r--jill-api/src/com/android/jill/api/v01/TranslationException.java43
-rw-r--r--jill/.classpath3
-rw-r--r--jill/rsc/META-INF/services/com.android.jill.api.JillProvider1
-rw-r--r--jill/rsc/jill.properties9
-rw-r--r--jill/src/com/android/jill/Jill.java44
-rw-r--r--jill/src/com/android/jill/Main.java2
-rw-r--r--jill/src/com/android/jill/Version.java122
-rw-r--r--jill/src/com/android/jill/api/impl/JillProviderImpl.java118
-rw-r--r--jill/src/com/android/jill/api/v01/impl/Api01ConfigImpl.java93
-rw-r--r--jill/tests/com/android/jill/Core.java28
30 files changed, 2119 insertions, 38 deletions
diff --git a/build.xml b/build.xml
index ad7e2d3..6407099 100644
--- a/build.xml
+++ b/build.xml
@@ -19,14 +19,15 @@
<import file="../jack/build.xml"/>
- <target name="dist" depends="jill, jillunittests"/>
+ <target name="dist" depends="jill, jill-api, jillunittests"/>
- <target name="clean" depends="jill-clean, jillunittests-clean,
+ <target name="clean" depends="jill-clean, jill-api-lib-clean, jillunittests-clean,
asm4-clean" />
<dirname property="jill-project.dir" file="${ant.file.jill}"/>
<property name="jill.dir" value="${jill-project.dir}/jill" />
+ <property name="jill-api.dir" value="${jill-project.dir}/jill-api" />
<property name="asm4.dir" value="${jill-project.dir}/asm4" />
@@ -45,10 +46,11 @@
<delete dir="${jill.libs.dir}" />
</target>
- <target name="jill-copy-libs" depends="sched-lib,guava-lib,asm4-lib,args4j-lib,jsr305-lib,
+ <target name="jill-copy-libs" depends="jill-api-lib,sched-lib,guava-lib,asm4-lib,args4j-lib,jsr305-lib,
dexcomparator-lib">
<copy todir="${jill.libs.dir}" flatten="true">
<filelist id="jill.libs.filelist" dir="/" >
+ <file name="${jill-api.dist.dir}/${jill-api.lib.name}"/>
<file name="${schedlib.dist.dir}/${schedlib.libname}"/>
<file name="${guava.dist.dir}/${guava.libname}"/>
<file name="${args4j.dist.dir}/${args4j.libname}"/>
@@ -103,6 +105,71 @@
<!-- ******************* -->
+ <!-- jill-api-lib -->
+ <!-- ******************* -->
+ <property name="jill-api.lib.build.dir" value="${jill-api.dir}/build/lib" />
+ <property name="jill-api.lib.build.outdir" value="${jill-api.lib.build.dir}/classes" />
+ <property name="jill-api.libs.dir" value="${jill-api.dir}/libs" />
+ <property name="jill-api.dist.dir" value="${jill-api.dir}/dist" />
+ <property name="jill-api.lib.name" value="jill-api-lib.jar" />
+
+ <target name="jill-api-lib-clean">
+ <delete dir="${jill-api.lib.build.dir}"/>
+ <delete dir="${jill-api.dist.dir}"/>
+ <delete dir="${jill-api.libs.dir}"/>
+ </target>
+
+ <target name="jill-api-lib-copy-libs" depends="jsr305-lib">
+ <copy todir="${jill-api.libs.dir}" flatten="true">
+ <filelist dir="/" >
+ <file name="${jsr305.dist.dir}/${jsr305.libname}"/>
+ </filelist>
+ </copy>
+ </target>
+
+ <target name="jill-api-lib" depends="jill-api-lib-copy-libs">
+ <mkdir dir="${jill-api.lib.build.outdir}"/>
+ <dependset>
+ <sources>
+ <!-- All source files -->
+ <fileset dir="${jill-api.dir}/src" />
+ </sources>
+ <targets>
+ <fileset dir="${jill-api.lib.build.outdir}"/>
+ </targets>
+ </dependset>
+ <javac srcdir="${jill-api.dir}/src" destdir="${jill-api.lib.build.outdir}"
+ source="1.6" target="1.6" debug="true"
+ includeantruntime="false" includeDestClasses="false" nowarn="true">
+ <classpath>
+ <filelist dir="/" >
+ <file name="${jsr305.dist.dir}/${jsr305.libname}"/>
+ </filelist>
+ </classpath>
+ <exclude name="com/android/jack/api/example/**"/>
+ </javac>
+ <jar destfile="${jill-api.dist.dir}/${jill-api.lib.name}">
+ <fileset dir="${jill-api.lib.build.outdir}"/>
+ </jar>
+ </target>
+
+
+ <!-- ******************* -->
+ <!-- jill-api -->
+ <!-- ******************* -->
+ <property name="jill-api.build.dir" value="${jill-api.dir}/build/exec" />
+ <property name="jill-api.build.outdir" value="${jill-api.build.dir}/classes" />
+ <property name="jill-api.name" value="jill-api.jar" />
+
+ <target name="jill-api" depends="jill-api-lib">
+ <jar destfile="${jill-api.dist.dir}/${jill-api.name}">
+ <fileset dir="${jsr305.build.outdir}"/>
+ <fileset dir="${jill-api.lib.build.outdir}"/>
+ </jar>
+ </target>
+
+
+ <!-- ******************* -->
<!-- jillunittests -->
<!-- ******************* -->
<property name="jillunittests.build.dir" value="${jill.dir}/build/jillunittests" />
@@ -125,8 +192,9 @@
<classpath>
<filelist dir="/">
<file name="${jill.dist.dir}/${jill.execname}" />
+ <file name="${jill-api.dist.dir}/${jill-api.name}" />
<file name="${jackunittests.dist.dir}/${jackunittests.execname}" />
- <file name="${jack-tests.dist.dir}/${jack-tests.execname}" />
+ <file name="${jack-tests.dist.dir}/${jack-tests.execname}" />
</filelist>
</classpath>
</javac>
@@ -182,6 +250,7 @@
<filelist id="jill.junit.tests.classpath" dir="/">
<file name="${jack-tests.dist.dir}/${jack-tests.execname}" />
<file name="${jill.dist.dir}/${jillunittests.execname}" />
+ <file name="${jill-api.dist.dir}/${jill-api.lib.name}" />
</filelist>
<target name="test-jill-clean" >
diff --git a/jill-api/.checkstyle b/jill-api/.checkstyle
new file mode 100644
index 0000000..5cc9f9e
--- /dev/null
+++ b/jill-api/.checkstyle
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
+ <local-check-config name="Jack Tests CheckStyle" location="jackstyle.xml" type="project" description="">
+ <additional-data name="protect-config-file" value="true"/>
+ </local-check-config>
+ <fileset name="all" enabled="false" check-config-name="Sun Checks" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+ <fileset name="Jack Tests Checkstyle" enabled="true" check-config-name="Jack Tests CheckStyle" local="true">
+ <file-match-pattern match-pattern="^src.*\.java$" include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/jill-api/.classpath b/jill-api/.classpath
new file mode 100644
index 0000000..6a74d2e
--- /dev/null
+++ b/jill-api/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="lib" path="libs/jsr305-lib.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="src" path=".apt_generated">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/jill-api/.project b/jill-api/.project
new file mode 100644
index 0000000..e55032d
--- /dev/null
+++ b/jill-api/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jill-api</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+ <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
+ </natures>
+</projectDescription>
diff --git a/jill-api/.settings/edu.umd.cs.findbugs.core.prefs b/jill-api/.settings/edu.umd.cs.findbugs.core.prefs
new file mode 100644
index 0000000..ea6af7a
--- /dev/null
+++ b/jill-api/.settings/edu.umd.cs.findbugs.core.prefs
@@ -0,0 +1,134 @@
+#FindBugs User Preferences
+#Fri Feb 28 14:57:04 CET 2014
+cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud
+detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
+detectorAtomicityProblem=AtomicityProblem|true
+detectorBadAppletConstructor=BadAppletConstructor|false
+detectorBadResultSetAccess=BadResultSetAccess|true
+detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
+detectorBadUseOfReturnValue=BadUseOfReturnValue|true
+detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
+detectorBooleanReturnNull=BooleanReturnNull|true
+detectorCallToUnsupportedMethod=CallToUnsupportedMethod|false
+detectorCheckExpectedWarnings=CheckExpectedWarnings|false
+detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
+detectorCheckRelaxingNullnessAnnotation=CheckRelaxingNullnessAnnotation|true
+detectorCheckTypeQualifiers=CheckTypeQualifiers|true
+detectorCloneIdiom=CloneIdiom|true
+detectorComparatorIdiom=ComparatorIdiom|true
+detectorConfusedInheritance=ConfusedInheritance|true
+detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
+detectorCrossSiteScripting=CrossSiteScripting|true
+detectorDefaultEncodingDetector=DefaultEncodingDetector|true
+detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
+detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
+detectorDontIgnoreResultOfPutIfAbsent=DontIgnoreResultOfPutIfAbsent|true
+detectorDontUseEnum=DontUseEnum|true
+detectorDroppedException=DroppedException|true
+detectorDumbMethodInvocations=DumbMethodInvocations|true
+detectorDumbMethods=DumbMethods|true
+detectorDuplicateBranches=DuplicateBranches|true
+detectorEmptyZipFileEntry=EmptyZipFileEntry|true
+detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
+detectorExplicitSerialization=ExplicitSerialization|true
+detectorFinalizerNullsFields=FinalizerNullsFields|true
+detectorFindBadCast2=FindBadCast2|true
+detectorFindBadForLoop=FindBadForLoop|true
+detectorFindCircularDependencies=FindCircularDependencies|false
+detectorFindDeadLocalStores=FindDeadLocalStores|true
+detectorFindDoubleCheck=FindDoubleCheck|true
+detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
+detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
+detectorFindFinalizeInvocations=FindFinalizeInvocations|true
+detectorFindFloatEquality=FindFloatEquality|true
+detectorFindHEmismatch=FindHEmismatch|true
+detectorFindInconsistentSync2=FindInconsistentSync2|true
+detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
+detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
+detectorFindMaskedFields=FindMaskedFields|true
+detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
+detectorFindNakedNotify=FindNakedNotify|true
+detectorFindNonShortCircuit=FindNonShortCircuit|true
+detectorFindNullDeref=FindNullDeref|true
+detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
+detectorFindOpenStream=FindOpenStream|true
+detectorFindPuzzlers=FindPuzzlers|true
+detectorFindRefComparison=FindRefComparison|true
+detectorFindReturnRef=FindReturnRef|true
+detectorFindRunInvocations=FindRunInvocations|true
+detectorFindSelfComparison=FindSelfComparison|true
+detectorFindSelfComparison2=FindSelfComparison2|true
+detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
+detectorFindSpinLoop=FindSpinLoop|true
+detectorFindSqlInjection=FindSqlInjection|true
+detectorFindTwoLockWait=FindTwoLockWait|true
+detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
+detectorFindUnconditionalWait=FindUnconditionalWait|true
+detectorFindUninitializedGet=FindUninitializedGet|true
+detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
+detectorFindUnreleasedLock=FindUnreleasedLock|true
+detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
+detectorFindUnsyncGet=FindUnsyncGet|true
+detectorFindUseOfNonSerializableValue=FindUseOfNonSerializableValue|true
+detectorFindUselessControlFlow=FindUselessControlFlow|true
+detectorFormatStringChecker=FormatStringChecker|true
+detectorHugeSharedStringConstants=HugeSharedStringConstants|true
+detectorIDivResultCastToDouble=IDivResultCastToDouble|true
+detectorIncompatMask=IncompatMask|true
+detectorInconsistentAnnotations=InconsistentAnnotations|true
+detectorInefficientMemberAccess=InefficientMemberAccess|false
+detectorInefficientToArray=InefficientToArray|true
+detectorInfiniteLoop=InfiniteLoop|true
+detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
+detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
+detectorInitializationChain=InitializationChain|true
+detectorInitializeNonnullFieldsInConstructor=InitializeNonnullFieldsInConstructor|true
+detectorInstantiateStaticClass=InstantiateStaticClass|true
+detectorIntCast2LongAsInstant=IntCast2LongAsInstant|true
+detectorInvalidJUnitTest=InvalidJUnitTest|true
+detectorIteratorIdioms=IteratorIdioms|true
+detectorLazyInit=LazyInit|true
+detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
+detectorLostLoggerDueToWeakReference=LostLoggerDueToWeakReference|true
+detectorMethodReturnCheck=MethodReturnCheck|true
+detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
+detectorMutableLock=MutableLock|true
+detectorMutableStaticFields=MutableStaticFields|true
+detectorNaming=Naming|true
+detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
+detectorNumberConstructor=NumberConstructor|true
+detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
+detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
+detectorPublicSemaphores=PublicSemaphores|false
+detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
+detectorReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass=ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass|true
+detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
+detectorRedundantInterfaces=RedundantInterfaces|true
+detectorRepeatedConditionals=RepeatedConditionals|true
+detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
+detectorSerializableIdiom=SerializableIdiom|true
+detectorStartInConstructor=StartInConstructor|true
+detectorStaticCalendarDetector=StaticCalendarDetector|true
+detectorStringConcatenation=StringConcatenation|true
+detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
+detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
+detectorSwitchFallthrough=SwitchFallthrough|true
+detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
+detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
+detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
+detectorURLProblems=URLProblems|true
+detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
+detectorUnnecessaryMath=UnnecessaryMath|true
+detectorUnreadFields=UnreadFields|true
+detectorUselessSubclassMethod=UselessSubclassMethod|false
+detectorVarArgsProblems=VarArgsProblems|true
+detectorVolatileUsage=VolatileUsage|true
+detectorWaitInLoop=WaitInLoop|true
+detectorWrongMapIterator=WrongMapIterator|true
+detectorXMLFactoryBypass=XMLFactoryBypass|true
+detector_threshold=2
+effort=default
+excludefilter0=.settings/findbugs-exclude.xml|true
+filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,EXPERIMENTAL,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false|20
+filter_settings_neg=NOISE,I18N|
+run_at_full_build=true
diff --git a/jill-api/.settings/org.eclipse.core.resources.prefs b/jill-api/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/jill-api/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/jill-api/.settings/org.eclipse.jdt.apt.core.prefs b/jill-api/.settings/org.eclipse.jdt.apt.core.prefs
new file mode 100644
index 0000000..7d52ece
--- /dev/null
+++ b/jill-api/.settings/org.eclipse.jdt.apt.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.apt.aptEnabled=true
+org.eclipse.jdt.apt.genSrcDir=.apt_generated
+org.eclipse.jdt.apt.reconcileEnabled=true
diff --git a/jill-api/.settings/org.eclipse.jdt.core.prefs b/jill-api/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..41027ae
--- /dev/null
+++ b/jill-api/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,426 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.CheckForNull
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignore
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.processAnnotations=enabled
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=1585
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent=1585|-1|1585
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=1585
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent=1585|-1|1585
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=1585
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent=1585|-1|1585
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=1585
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent=1585|-1|1585
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=1040
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent=1040|-1|1040
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=1585
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent=1585|-1|1585
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent=16|5|80
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent=16|-1|16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent=16|-1|16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent=16|5|80
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent=16|5|80
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent=16|4|80
+org.eclipse.jdt.core.formatter.alignment_for_assignment=16
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent=16|-1|16
+org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments=16
+org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent=16|-1|16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent=16|5|48
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent=16|5|80
+org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_for_statement=16
+org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16
+org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent=16|-1|16
+org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent=16|-1|16
+org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=20
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent=16|5|80
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent=16|5|80
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent=16|4|48
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent=16|4|49
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent=16|4|48
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent=16|4|48
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent=16|4|48
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=0
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.force_if_else_statement_brace=true
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false
+org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true
+org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true
+org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true
+org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false
+org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false
diff --git a/jill-api/.settings/org.eclipse.jdt.ui.prefs b/jill-api/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..d44207b
--- /dev/null
+++ b/jill-api/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,63 @@
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Jack Format 100
+formatter_settings_version=13
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=com.google;android;antenna;antlr;ar;asposewobfuscated;asquare;atg;au;beaver;bibtex;bmsi;bsh;ccl;cern;ChartDirector;checkers;com;COM;common;contribs;corejava;cryptix;cybervillains;dalvik;danbikel;de;EDU;eg;eu;examples;fat;fit;fitlibrary;fmpp;freemarker;gnu;groovy;groovyjarjarantlr;groovyjarjarasm;hak;hep;ie;imageinfo;info;it;jal;Jama;japa;japacheckers;jas;jasmin;javancss;javanet;javassist;javazoom;java_cup;jcifs;jetty;JFlex;jj2000;jline;jp;JSci;jsr166y;junit;jxl;jxxload_help;kawa;kea;libcore;libsvm;lti;memetic;mt;mx4j;net;netscape;nl;nu;oauth;ognl;opennlp;oracle;org;penn2dg;pennconverter;pl;prefuse;proguard;repackage;scm;se;serp;simple;soot;sqlj;src;ssa;sun;sunlabs;tcl;testdata;testshell;testsuite;twitter4j;uk;ViolinStrings;weka;wet;winstone;woolfel;wowza;;java;javax;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=999
+org.eclipse.jdt.ui.staticondemandthreshold=999
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\n * Copyright (C) ${year} The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http\://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment"/><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=false
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=false
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=false
+sp_cleanup.remove_unused_private_types=false
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/jill-api/.settings/org.eclipse.ltk.core.refactoring.prefs b/jill-api/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..b196c64
--- /dev/null
+++ b/jill-api/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/jill-api/MODULE_LICENSE_APACHE2 b/jill-api/MODULE_LICENSE_APACHE2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/jill-api/MODULE_LICENSE_APACHE2
diff --git a/jill-api/NOTICE b/jill-api/NOTICE
new file mode 100644
index 0000000..2bb9ad2
--- /dev/null
+++ b/jill-api/NOTICE
@@ -0,0 +1,176 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/jill-api/jackstyle.xml b/jill-api/jackstyle.xml
new file mode 100644
index 0000000..3940973
--- /dev/null
+++ b/jill-api/jackstyle.xml
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+
+<!-- This is a checkstyle configuration file. For descriptions of
+what the following rules do, please see the checkstyle configuration
+page at http://checkstyle.sourceforge.net/config.html -->
+
+<!-- Checks with numbered comments refer to recommendations made
+by Joshua Bloch in his book Effective Java -->
+
+<module name="Checker">
+ <property name="charset" value="UTF-8"/>
+ <module name="FileTabCharacter">
+ <!-- Checks that there are no tab characters in the file.
+ -->
+ </module>
+
+ <module name="RegexpSingleline">
+ <!-- Checks that FIXME is not used in comments. TODO is preferred.
+ -->
+ <property name="format" value="((//.*)|(\*.*))FIXME" />
+ <property name="message" value='TODO is preferred to FIXME. e.g. "TODO(johndoe): Refactor when v2 is released."' />
+ </module>
+
+ <module name="RegexpSingleline">
+ <!-- Checks that TODOs are properly formatted.
+
+ The (?&lt;!TODO\(.{0,100}) makes the regex ignore any secondary TODO's on the line
+ so that things like //TODO(bob): remove this TODO on 1/1/2020 don't trigger a warning
+ because of the second TODO. (The {0,100} is because java doesn't recoginize arbitrary
+ length look backs, but we know each java line should be < 100 chars.)
+ -->
+ <property name="format" value="((//.*)|(\*.*))(?&lt;!TODO\(.{0,100})(TODO[^(])|(TODO\([^)]*$)" />
+ <property name="message" value='All TODOs should be named. e.g. "TODO(johndoe): Refactor when v2 is released."' />
+ </module>
+
+
+ <!-- All Java AST specific tests live under TreeWalker module. -->
+ <module name="TreeWalker">
+
+ <!--
+
+ IMPORT CHECKS
+
+ -->
+
+ <module name="RedundantImport">
+ <property name="severity" value="error"/>
+ </module>
+
+ <module name="AvoidStarImport">
+ <property name="severity" value="error"/>
+ </module>
+
+ <module name="UnusedImports">
+ <!-- DPL is a notable violator of this rule. -->
+ <property name="severity" value="error"/>
+ <!-- Imports used only in Javadoc are tolerated. -->
+ <property name="processJavadoc" value="true"/>
+ <message
+ key="import.unused"
+ value="Unused import: {0}." />
+ </module>
+
+ <module name="ImportOrder">
+ <!-- Checks for out of order import statements. -->
+ <property name="severity" value="warning"/>
+ <property name="groups" value="com.google,*,java,javax"/>
+ <!-- This ensures that static imports go first. -->
+ <property name="option" value="top"/>
+ <property name="tokens" value="STATIC_IMPORT, IMPORT"/>
+ </module>
+
+ <!--
+
+ JAVADOC CHECKS
+
+ -->
+
+ <module name="JavadocType">
+ <!-- Item 28 - Write doc comments for all exposed API elements. -->
+ <!-- Ensure all classes with visability greater than or equal to
+ protected have class level documentation. -->
+ <property name="scope" value="protected"/>
+ <property name="severity" value="error"/>
+ <!-- Style guide doesn't prohibit custom tags. Typos will be caught by other tools. -->
+ <property name="allowUnknownTags" value="true"/>
+ <property name="allowMissingParamTags" value="true"/>
+ <message key="javadoc.missing"
+ value="Missing a Javadoc comment."/>
+ </module>
+
+ <!--
+
+ NAMING CHECKS
+
+ -->
+
+ <!-- Item 38 - Adhere to generally accepted naming conventions -->
+
+ <module name="PackageName">
+ <!-- Validates identifiers for package names against the
+ supplied expression. -->
+ <!-- Here the default checkstyle rule restricts package name parts to
+ seven characters, this is not in line with common practice at Google.
+ -->
+ <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,})*$"/>
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="TypeNameCheck">
+ <metadata name="altname" value="TypeName"/>
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="StaticVariableNameCheck">
+ <!-- Validates static, non-final fields against the supplied
+ expression "^[a-z][a-zA-Z0-9]*?$". -->
+ <metadata name="altname" value="StaticVariableName"/>
+ <property name="applyToPublic" value="true"/>
+ <property name="applyToProtected" value="true"/>
+ <property name="applyToPackage" value="true"/>
+ <property name="applyToPrivate" value="true"/>
+ <property name="format" value="^[a-z][a-zA-Z0-9]*?$"/>
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="MemberNameCheck">
+ <!-- Validates non-static members against the supplied expression. -->
+ <metadata name="altname" value="MemberName"/>
+ <property name="applyToPublic" value="true"/>
+ <property name="applyToProtected" value="true"/>
+ <property name="applyToPackage" value="true"/>
+ <property name="applyToPrivate" value="true"/>
+ <property name="format" value="^[a-z][a-zA-Z0-9]*?$"/>
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="MethodNameCheck">
+ <!-- Validates identifiers for method names. -->
+ <metadata name="altname" value="MethodName"/>
+ <property name="format" value="^[a-z][a-zA-Z0-9]*([a-zA-Z0-9]+)*$"/>
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="ParameterName">
+ <!-- Validates identifiers for method parameters against the
+ expression "^[a-z][a-zA-Z0-9]*$". -->
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="LocalFinalVariableName">
+ <!-- Validates identifiers for local final variables against the
+ expression "^[a-z][a-zA-Z0-9]*$". -->
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="LocalVariableName">
+ <!-- Validates identifiers for local variables against the
+ expression "^[a-z][a-zA-Z0-9]*$". -->
+ <property name="severity" value="warning"/>
+ </module>
+
+
+ <!--
+
+ LENGTH and CODING CHECKS
+
+ -->
+
+ <module name="LineLength">
+ <!-- Checks if a line is too long. -->
+ <property name="max" value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}" default="100"/>
+ <property name="severity" value="error"/>
+
+ <!--
+ The default ignore pattern exempts the following elements:
+ - import statements
+ - long URLs inside comments
+ -->
+
+ <property name="ignorePattern"
+ value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.ignorePattern}"
+ default="^(package .*;\s*)|(import .*;\s*)|( *\* *https?://.*)|(\s*@[\w\.\$]+::\w+(?:\([^\(]*\)|\(\)\(\))?[,;]?)|(\s+\* \{@(link|see) [^\s][^\}]*\}[\.,;]?)$"/>
+ </module>
+
+ <module name="LeftCurly">
+ <!-- Checks for placement of the left curly brace ('{'). -->
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="RightCurly">
+ <!-- Checks right curlies on CATCH, ELSE, and TRY blocks are on
+ the same line. e.g., the following example is fine:
+ <pre>
+ if {
+ ...
+ } else
+ </pre>
+ -->
+ <!-- This next example is not fine:
+ <pre>
+ if {
+ ...
+ }
+ else
+ </pre>
+ -->
+ <property name="option" value="same"/>
+ <property name="severity" value="warning"/>
+ </module>
+
+ <!-- Checks for braces around if and else blocks -->
+ <module name="NeedBraces">
+ <property name="severity" value="warning"/>
+ <property name="tokens" value="LITERAL_IF, LITERAL_ELSE, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO"/>
+ </module>
+
+ <module name="UpperEll">
+ <!-- Checks that long constants are defined with an upper ell.-->
+ <property name="severity" value="error"/>
+ </module>
+
+ <module name="FallThrough">
+ <!-- Warn about falling through to the next case statement. Similar to
+ javac -Xlint:fallthrough, but the check is suppressed if there is a single-line comment
+ on the last non-blank line preceding the fallen-into case.
+ -->
+ <property name="reliefPattern"
+ value=".*"/>
+ <property name="severity" value="error"/>
+ </module>
+
+
+ <!--
+
+ MODIFIERS CHECKS
+
+ -->
+
+ <module name="ModifierOrder">
+ <!-- Warn if modifier order is inconsistent with JLS3 8.1.1, 8.3.1, and
+ 8.4.3. The prescribed order is:
+ public, protected, private, abstract, static, final, transient, volatile,
+ synchronized, native, strictfp
+ -->
+ </module>
+
+
+ <!--
+
+ WHITESPACE CHECKS
+
+ -->
+
+ <module name="WhitespaceAround">
+ <!-- Checks that various tokens are surrounded by whitespace.
+ This includes most binary operators and keywords followed
+ by regular or curly braces.
+ -->
+ <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR,
+ BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN,
+ EQUAL, GE, GT, LAND, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
+ LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
+ LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS,
+ MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION,
+ SL, SL_ASSIGN, SR_ASSIGN, STAR, STAR_ASSIGN"/>
+ <property name="severity" value="error"/>
+ </module>
+
+ <module name="WhitespaceAfter">
+ <!-- Checks that commas, semicolons and typecasts are followed by
+ whitespace.
+ -->
+ <property name="tokens" value="COMMA, SEMI, TYPECAST"/>
+ </module>
+
+ <module name="NoWhitespaceAfter">
+ <!-- Checks that there is no whitespace after various unary operators.
+ Linebreaks are allowed.
+ -->
+ <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS,
+ UNARY_PLUS"/>
+ <property name="allowLineBreaks" value="true"/>
+ <property name="severity" value="error"/>
+ </module>
+
+ <module name="NoWhitespaceBefore">
+ <!-- Checks that there is no whitespace before various unary operators.
+ Linebreaks are allowed.
+ -->
+ <property name="tokens" value="SEMI, DOT, POST_DEC, POST_INC"/>
+ <property name="allowLineBreaks" value="true"/>
+ <property name="severity" value="error"/>
+ </module>
+
+ <module name="ParenPad">
+ <!-- Checks that there is no whitespace before close parens or after
+ open parens.
+ -->
+ <property name="severity" value="warning"/>
+ </module>
+
+ <!--
+
+ MISC CHECKS
+
+ -->
+
+ </module>
+</module>
+
diff --git a/jill-api/src/com/android/jill/api/ConfigNotSupportedException.java b/jill-api/src/com/android/jill/api/ConfigNotSupportedException.java
new file mode 100644
index 0000000..e4848f5
--- /dev/null
+++ b/jill-api/src/com/android/jill/api/ConfigNotSupportedException.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill.api;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Thrown when the requested Jill configuration for a given API version is not supported.
+ */
+public class ConfigNotSupportedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public ConfigNotSupportedException() {
+ super();
+ }
+
+ public ConfigNotSupportedException(@Nonnull String message) {
+ super(message);
+ }
+
+ public ConfigNotSupportedException(@Nonnull String message, @Nonnull Throwable cause) {
+ super(message, cause);
+ }
+
+ public ConfigNotSupportedException(@Nonnull Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/jill-api/src/com/android/jill/api/JillConfig.java b/jill-api/src/com/android/jill/api/JillConfig.java
new file mode 100644
index 0000000..cde0c35
--- /dev/null
+++ b/jill-api/src/com/android/jill/api/JillConfig.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill.api;
+
+/**
+ * Allows to set a configuration for Jill.
+ */
+public interface JillConfig {
+}
diff --git a/jill-api/src/com/android/jill/api/JillProvider.java b/jill-api/src/com/android/jill/api/JillProvider.java
new file mode 100644
index 0000000..30fd4e3
--- /dev/null
+++ b/jill-api/src/com/android/jill/api/JillProvider.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill.api;
+
+import java.util.Collection;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nonnegative;
+import javax.annotation.Nonnull;
+
+/**
+ * Provides instances of {@link JillConfig}.
+ */
+public interface JillProvider {
+ /**
+ * Creates a {@link JillConfig} instance for an interface representing a {@link JillConfig} API
+ * version.
+ * @param cls the {@link JillConfig} API interface
+ * @return the {@link JillConfig} instance
+ * @throws ConfigNotSupportedException If no implementation is found for the given interface.
+ */
+ @Nonnull
+ <T extends JillConfig> T createConfig(@Nonnull Class<T> cls) throws ConfigNotSupportedException;
+
+ /**
+ * Returns whether an interface representing a {@link JillConfig} API version is supported.
+ *
+ * @param cls the {@link JillConfig} API interface
+ * @return <code>true</true> if the config is supported
+ */
+ @Nonnull
+ <T extends JillConfig> boolean isConfigSupported(@Nonnull Class<T> cls);
+
+ /**
+ * Gives a {@link Collection} containing supported {@link JillConfig} API versions.
+ * @return the supported {@link JillConfig} API versions
+ */
+ @Nonnull
+ Collection<Class<? extends JillConfig>> getSupportedConfigs();
+
+ /**
+ * Gives the version of this Jill, summarized in one string (e.g. "1.1-rc1", "2.0-a2",
+ * ...).
+ *
+ * @return the version
+ */
+ @Nonnull
+ String getTranslatorVersion();
+
+ /**
+ * Gives the release name of this Jill (e.g. Arzon, Brest, ...).
+ *
+ * @return the release name
+ */
+ @Nonnull
+ String getTranslatorReleaseName();
+
+ /**
+ * Gives an integer value that represents the release of this Jill, relative to other
+ * releases.
+ *
+ * @return the release code
+ */
+ @Nonnegative
+ int getTranslatorReleaseCode();
+
+ /**
+ * Gives an integer value that represents the sub-release of this Jill, relative to other
+ * sub-releases of the same release.
+ *
+ * @return the sub-release code
+ */
+ @Nonnegative
+ int getTranslatorSubReleaseCode();
+
+ /**
+ * Gives the kind of sub-release of this Jill.
+ *
+ * @return the sub-release kind
+ */
+ @Nonnull
+ SubReleaseKind getTranslatorSubReleaseKind();
+
+ /**
+ * The kind of sub-release.
+ */
+ public enum SubReleaseKind {
+ /**
+ * A sub-release from an engineering development, not tested, not in the code base repository.
+ */
+ ENGINEERING,
+ /**
+ * A sub-release that is not feature complete, not tested.
+ */
+ PRE_ALPHA,
+ /**
+ * A sub-release that is not feature complete, tested.
+ */
+ ALPHA,
+ /**
+ * A sub-release that is feature complete, tested, but likely contains known or unknown bugs.
+ */
+ BETA,
+ /**
+ * A pre-production sub-release, tested.
+ */
+ CANDIDATE,
+ /**
+ * A production and stable sub-release.
+ */
+ RELEASE;
+ }
+
+ /**
+ * The build ID of this Jill.
+ * @return the build ID, or null if not available
+ */
+ @CheckForNull
+ String getTranslatorBuildId();
+
+ /**
+ * Identify the source code base of this Jill.
+ * @return the source code base, or null if not available
+ */
+ @CheckForNull
+ String getTranslatorSourceCodeBase();
+}
diff --git a/jill-api/src/com/android/jill/api/example/WithServiceLoader.java b/jill-api/src/com/android/jill/api/example/WithServiceLoader.java
new file mode 100644
index 0000000..cd720f0
--- /dev/null
+++ b/jill-api/src/com/android/jill/api/example/WithServiceLoader.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill.api.example;
+
+import com.android.jill.api.ConfigNotSupportedException;
+import com.android.jill.api.JillConfig;
+import com.android.jill.api.JillProvider;
+import com.android.jill.api.v01.Api01Config;
+import com.android.jill.api.v01.Api01TranslationTask;
+import com.android.jill.api.v01.ConfigurationException;
+import com.android.jill.api.v01.TranslationException;
+
+import java.io.File;
+import java.util.NoSuchElementException;
+import java.util.ServiceLoader;
+
+/**
+ * Sample of Jill api usage based on a service provider.
+ * This sample requires jill.jar on classpath.
+ */
+public class WithServiceLoader {
+ public static void main(String[] args) throws SecurityException, IllegalArgumentException {
+ if (args.length != 2) {
+ System.out.println(
+ "Usage: <jill input archive> <jill output archive>");
+ return;
+ }
+
+ ServiceLoader<JillProvider> serviceLoader = ServiceLoader.load(JillProvider.class);
+ JillProvider provider;
+ try {
+ provider = serviceLoader.iterator().next();
+ } catch (NoSuchElementException e) {
+ System.out.println("Check that jill.jar is on classpath");
+ return;
+ }
+
+ System.out.println("Translator version: " + provider.getTranslatorVersion());
+ System.out.println("Translator release name: " + provider.getTranslatorReleaseName());
+ System.out.println("Translator release code: " + provider.getTranslatorReleaseCode());
+ System.out.println("Translator sub-release kind: " + provider.getTranslatorSubReleaseKind());
+ System.out.println("Translator sub-release code: " + provider.getTranslatorSubReleaseCode());
+ String str;
+ str = provider.getTranslatorBuildId();
+ System.out.println("Translator build id: " + ((str != null) ? str : "Unknown"));
+ str = provider.getTranslatorSourceCodeBase();
+ System.out.println("Translator souce code base: " + ((str != null) ? str : "Unknown"));
+ System.out.print("Supported configurations: ");
+
+ for (Class<? extends JillConfig> config : provider.getSupportedConfigs()) {
+ System.out.print(config.getSimpleName());
+ assert provider.isConfigSupported(config);
+ }
+ System.out.println();
+
+ Api01TranslationTask translationTask;
+ Api01Config config;
+
+ // Get configuration object
+ try {
+ config = provider.createConfig(Api01Config.class);
+ } catch (ConfigNotSupportedException e1) {
+ System.err.println("Brest config not supported)");
+ return;
+ }
+
+ // Configure
+ try {
+ config.setInputJavaBinaryFile(new File(args[0]));
+
+ config.setOutputJackFile(new File(args[1]));
+
+ // Check and build
+ translationTask = config.getTask();
+
+ } catch (ConfigurationException e) {
+ System.err.println(e.getMessage());
+ return;
+ }
+
+ // Run the translation
+ try {
+ translationTask.run();
+ } catch (TranslationException e) {
+ System.out.println("User error, see reporter");
+ return;
+ }
+ }
+}
diff --git a/jill-api/src/com/android/jill/api/v01/Api01Config.java b/jill-api/src/com/android/jill/api/v01/Api01Config.java
new file mode 100644
index 0000000..b1923bd
--- /dev/null
+++ b/jill-api/src/com/android/jill/api/v01/Api01Config.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill.api.v01;
+
+
+import com.android.jill.api.JillConfig;
+
+import java.io.File;
+
+import javax.annotation.Nonnull;
+
+/**
+* A configuration implementation for API level 01 of Jill.
+*/
+public interface Api01Config extends JillConfig {
+
+ /**
+ * Sets verbosity mode.
+ * @param isVerbose the desired verbosity mode
+ */
+ void setVerbose(boolean isVerbose) throws ConfigurationException;
+
+ /**
+ * Sets jar file to apply the Jill translation onto. The file must exist.
+ * @param input jar file to translate
+ */
+ void setInputJavaBinaryFile(@Nonnull File input) throws ConfigurationException;
+
+ /**
+ * Sets the file where the output Jack library will be written. The file may already exist and
+ * will be overwritten.
+ * @param outputJackFile The output Jack library file
+ * @throws ConfigurationException
+ */
+ void setOutputJackFile(@Nonnull File outputJackFile) throws ConfigurationException;
+
+
+ /**
+ * Sets whether debug info should be emitted.
+ * @param debugInfo the desired mode for debug info emission
+ */
+ void setDebugInfo(boolean debugInfo) throws ConfigurationException;
+
+ /**
+ * Creates an instance of the {@link Api01TranslationTask} according to this configuration.
+ * @return The {@link Api01TranslationTask}
+ */
+ @Nonnull
+ Api01TranslationTask getTask() throws ConfigurationException;
+}
diff --git a/jill-api/src/com/android/jill/api/v01/Api01TranslationTask.java b/jill-api/src/com/android/jill/api/v01/Api01TranslationTask.java
new file mode 100644
index 0000000..25f70bf
--- /dev/null
+++ b/jill-api/src/com/android/jill/api/v01/Api01TranslationTask.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill.api.v01;
+
+
+/**
+ * A task allowing to run Jill once.
+ */
+public interface Api01TranslationTask {
+
+ /**
+ * Runs the translation task. May be called only once.
+ * @throws TranslationException If a fatal error occurred during the translation
+ * @throws IllegalStateException If the translation task is run more than once
+ */
+ void run() throws TranslationException, IllegalStateException;
+}
diff --git a/jill-api/src/com/android/jill/api/v01/ConfigurationException.java b/jill-api/src/com/android/jill/api/v01/ConfigurationException.java
new file mode 100644
index 0000000..76f0d87
--- /dev/null
+++ b/jill-api/src/com/android/jill/api/v01/ConfigurationException.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * 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.android.jill.api.v01;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Thrown when something is wrong in Jill configuration.
+ */
+public class ConfigurationException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public ConfigurationException(@Nonnull String message) {
+ super(message);
+ }
+
+ public ConfigurationException(@Nonnull String message, @Nonnull Throwable cause) {
+ super(message, cause);
+ }
+
+ public ConfigurationException(@Nonnull Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/jill-api/src/com/android/jill/api/v01/TranslationException.java b/jill-api/src/com/android/jill/api/v01/TranslationException.java
new file mode 100644
index 0000000..41121b3
--- /dev/null
+++ b/jill-api/src/com/android/jill/api/v01/TranslationException.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill.api.v01;
+
+import javax.annotation.Nonnull;
+
+/**
+ * A fatal problem that caused Jill to abort the translation. The problem should already have
+ * reported, so it is safe to ignore its message.
+ */
+public class TranslationException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public TranslationException() {
+ super();
+ }
+
+ public TranslationException(@Nonnull String message) {
+ super(message);
+ }
+
+ public TranslationException(@Nonnull String message, @Nonnull Throwable cause) {
+ super(message, cause);
+ }
+
+ public TranslationException(@Nonnull Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/jill/.classpath b/jill/.classpath
index c567998..abd8305 100644
--- a/jill/.classpath
+++ b/jill/.classpath
@@ -9,9 +9,10 @@
<classpathentry kind="lib" path="libs/dexcomparator-lib.jar"/>
<classpathentry kind="lib" path="libs/guava-lib.jar"/>
<classpathentry kind="lib" path="libs/jsr305-lib.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/Scheduler"/>
<classpathentry combineaccessrules="false" kind="src" path="/Dx"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry combineaccessrules="false" kind="src" path="/jack-tests"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jill-api"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/Scheduler"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/jill/rsc/META-INF/services/com.android.jill.api.JillProvider b/jill/rsc/META-INF/services/com.android.jill.api.JillProvider
new file mode 100644
index 0000000..ec6da23
--- /dev/null
+++ b/jill/rsc/META-INF/services/com.android.jill.api.JillProvider
@@ -0,0 +1 @@
+com.android.jill.api.impl.JillProviderImpl \ No newline at end of file
diff --git a/jill/rsc/jill.properties b/jill/rsc/jill.properties
index 279c2d7..e863058 100644
--- a/jill/rsc/jill.properties
+++ b/jill/rsc/jill.properties
@@ -14,4 +14,11 @@
# limitations under the License.
#
jill.version=1.1-a9
-jill.version.codename=Brest
+jill.version.release.name=Brest
+jill.version.release.code=2
+jill.version.sub-release.kind=ALPHA
+jill.version.sub-release.code=9
+
+# These properties are added by the release step
+# jill.version.buildid=<BUILDID>
+# jill.version.sha=<SHA>
diff --git a/jill/src/com/android/jill/Jill.java b/jill/src/com/android/jill/Jill.java
index 35c5c18..0017175 100644
--- a/jill/src/com/android/jill/Jill.java
+++ b/jill/src/com/android/jill/Jill.java
@@ -24,9 +24,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
-import java.util.Properties;
import java.util.jar.JarFile;
+import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
/**
@@ -36,11 +36,12 @@ public class Jill {
@Nonnull
private static final String PROPERTIES_FILE = "jill.properties";
-
+ @CheckForNull
+ private static Version version = null;
public static void process(@Nonnull Options options) {
File binaryFile = options.getBinaryFile();
- JavaTransformer jt = new JavaTransformer(getVersion(), options);
+ JavaTransformer jt = new JavaTransformer(getVersion().getVersion(), options);
if (binaryFile.isFile()) {
if (FileUtils.isJavaBinaryFile(binaryFile)) {
List<File> javaBinaryFiles = new ArrayList<File>();
@@ -63,36 +64,19 @@ public class Jill {
}
@Nonnull
- public static String getVersion() {
- String version = "Unknown (problem with " + PROPERTIES_FILE + " resource file)";
-
- InputStream is = Main.class.getClassLoader().getResourceAsStream(PROPERTIES_FILE);
- if (is != null) {
- Properties prop = new Properties();
- try {
- prop.load(is);
- String rawVersion = prop.getProperty("jill.version");
- if (rawVersion != null) {
- version = rawVersion;
-
- String codeName = prop.getProperty("jill.version.codename");
- if (codeName != null) {
- version += " \'" + codeName + '\'';
- }
-
- String bid = prop.getProperty("jill.version.buildid", "engineering");
- String sha = prop.getProperty("jill.version.sha");
- if (sha != null) {
- version += " (" + bid + ' ' + sha + ')';
- } else {
- version += " (" + bid + ')';
- }
- }
- } catch (IOException e) {
- // Return default version
+ public static Version getVersion() {
+ if (version == null) {
+ InputStream is = Jill.class.getClassLoader().getResourceAsStream(PROPERTIES_FILE);
+ if (is != null) {
+ version = new Version(is);
+ } else {
+ System.err.println("Failed to open Jack properties file " + PROPERTIES_FILE);
+ throw new AssertionError();
}
}
+ assert version != null;
return version;
}
+
}
diff --git a/jill/src/com/android/jill/Main.java b/jill/src/com/android/jill/Main.java
index 0c5c91b..dce329a 100644
--- a/jill/src/com/android/jill/Main.java
+++ b/jill/src/com/android/jill/Main.java
@@ -46,7 +46,7 @@ public class Main {
if (options.askForVersion()) {
System.out.println("Jill");
- System.out.println("Version: " + Jill.getVersion() + '.');
+ System.out.println("Version: " + Jill.getVersion().getVersion() + '.');
System.exit(ExitStatus.SUCCESS);
}
diff --git a/jill/src/com/android/jill/Version.java b/jill/src/com/android/jill/Version.java
new file mode 100644
index 0000000..2f7f376
--- /dev/null
+++ b/jill/src/com/android/jill/Version.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill;
+
+import com.android.jill.api.JillProvider.SubReleaseKind;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nonnegative;
+import javax.annotation.Nonnull;
+
+/**
+ * A class describing version, release, build & code.
+ */
+public class Version {
+
+ @Nonnull
+ private String version;
+ @Nonnull
+ private String releaseName;
+ @Nonnegative
+ private int releaseCode;
+ @Nonnull
+ private SubReleaseKind subReleaseKind;
+ @Nonnegative
+ private int subReleaseCode;
+ @CheckForNull
+ private String buildId;
+ @CheckForNull
+ private String codeBase;
+
+ public Version(@Nonnull InputStream is) {
+ Properties prop = new Properties();
+ try {
+ prop.load(is);
+
+ version = prop.getProperty("jill.version");
+ assert version != null;
+
+ releaseName = prop.getProperty("jill.version.release.name");
+ assert releaseName != null;
+
+ releaseCode = Integer.parseInt(prop.getProperty("jill.version.release.code"));
+ assert releaseCode >= 1;
+
+ subReleaseCode = Integer.parseInt(prop.getProperty("jill.version.sub-release.code"));
+ assert subReleaseCode >= 1;
+
+ subReleaseKind =
+ SubReleaseKind.valueOf(SubReleaseKind.class,
+ prop.getProperty("jill.version.sub-release.kind"));
+ buildId = prop.getProperty("jill.version.buildid");
+ codeBase = prop.getProperty("jill.version.sha");
+
+ if (codeBase == null || buildId == null) {
+ subReleaseKind = SubReleaseKind.ENGINEERING;
+ }
+ } catch (IOException e) {
+ System.err.println("Failed to read Jill properties");
+ throw new AssertionError(e);
+ }
+ }
+
+ @Nonnull
+ public String getVersion() {
+ return version;
+ }
+
+ @Nonnull
+ public String getReleaseName() {
+ return releaseName;
+ }
+
+ @Nonnegative
+ public int getReleaseCode() {
+ return releaseCode;
+ }
+
+ @Nonnull
+ public SubReleaseKind getSubReleaseKind() {
+ return subReleaseKind;
+ }
+
+ @Nonnegative
+ public int getSubReleaseCode() {
+ return subReleaseCode;
+ }
+
+ @CheckForNull
+ public String getBuildId() {
+ return buildId;
+ }
+
+ @CheckForNull
+ public String getCodeBase() {
+ return codeBase;
+ }
+
+ @Nonnull
+ public String getVerboseVersion() {
+ return version + " '" + releaseName + "' ("
+ + (buildId != null ? buildId : "engineering")
+ + (codeBase != null ? (' ' + codeBase) : "") + ")";
+ }
+} \ No newline at end of file
diff --git a/jill/src/com/android/jill/api/impl/JillProviderImpl.java b/jill/src/com/android/jill/api/impl/JillProviderImpl.java
new file mode 100644
index 0000000..98a0978
--- /dev/null
+++ b/jill/src/com/android/jill/api/impl/JillProviderImpl.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill.api.impl;
+
+import com.android.jill.Jill;
+import com.android.jill.api.ConfigNotSupportedException;
+import com.android.jill.api.JillConfig;
+import com.android.jill.api.JillProvider;
+import com.android.jill.api.v01.Api01Config;
+import com.android.jill.api.v01.impl.Api01ConfigImpl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nonnull;
+
+/**
+ * This class provides an implementation to build the requested {@link JillConfig}
+ */
+public class JillProviderImpl implements JillProvider {
+
+ @Override
+ @Nonnull
+ @SuppressWarnings("unchecked")
+ public <T extends JillConfig> T createConfig(@Nonnull Class<T> cls)
+ throws ConfigNotSupportedException {
+ if (cls == Api01Config.class) {
+ return (T) new Api01ConfigImpl();
+ }
+
+ throw new ConfigNotSupportedException(cls.getName() + " are not supported");
+ }
+
+ @Override
+ @Nonnull
+ public <T extends JillConfig> boolean isConfigSupported(@Nonnull Class<T> cls) {
+ return cls == Api01Config.class;
+ }
+
+ @Override
+ @Nonnull
+ public Collection<Class<? extends JillConfig>> getSupportedConfigs() {
+ List<Class<? extends JillConfig>> result = new ArrayList<Class<? extends JillConfig>>(1);
+ result.add(Api01Config.class);
+ return result;
+ }
+
+ @Override
+ @Nonnull
+ public String getTranslatorVersion() {
+ return Jill.getVersion().getVersion();
+ }
+
+ @Override
+ @Nonnull
+ public String getTranslatorReleaseName() {
+ return Jill.getVersion().getReleaseName();
+ }
+
+ @Override
+ public int getTranslatorReleaseCode() {
+ return Jill.getVersion().getReleaseCode();
+ }
+
+ @Override
+ public int getTranslatorSubReleaseCode() {
+ return Jill.getVersion().getSubReleaseCode();
+ }
+
+ @Override
+ @Nonnull
+ public SubReleaseKind getTranslatorSubReleaseKind() {
+ switch (Jill.getVersion().getSubReleaseKind()) {
+ case ENGINEERING:
+ return SubReleaseKind.ENGINEERING;
+ case PRE_ALPHA:
+ return SubReleaseKind.PRE_ALPHA;
+ case ALPHA:
+ return SubReleaseKind.ALPHA;
+ case BETA:
+ return SubReleaseKind.BETA;
+ case CANDIDATE:
+ return SubReleaseKind.CANDIDATE;
+ case RELEASE:
+ return SubReleaseKind.RELEASE;
+ default:
+ throw new AssertionError(Jill.getVersion().getSubReleaseKind().name());
+ }
+ }
+
+ @Override
+ @CheckForNull
+ public String getTranslatorBuildId() {
+ return Jill.getVersion().getBuildId();
+ }
+
+ @Override
+ @CheckForNull
+ public String getTranslatorSourceCodeBase() {
+ return Jill.getVersion().getCodeBase();
+ }
+} \ No newline at end of file
diff --git a/jill/src/com/android/jill/api/v01/impl/Api01ConfigImpl.java b/jill/src/com/android/jill/api/v01/impl/Api01ConfigImpl.java
new file mode 100644
index 0000000..6aba8a0
--- /dev/null
+++ b/jill/src/com/android/jill/api/v01/impl/Api01ConfigImpl.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * 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.android.jill.api.v01.impl;
+
+import com.android.jill.Jill;
+import com.android.jill.Options;
+import com.android.jill.api.v01.Api01Config;
+import com.android.jill.api.v01.Api01TranslationTask;
+import com.android.jill.api.v01.ConfigurationException;
+import com.android.jill.utils.FileUtils;
+
+import java.io.File;
+
+import javax.annotation.Nonnull;
+
+/**
+ * This class provides the version 01 implementation of Jill API.
+ */
+public class Api01ConfigImpl implements Api01Config {
+
+ @Nonnull
+ private final Options options;
+
+ public Api01ConfigImpl() {
+ options = new Options();
+ }
+
+ @Override
+ @Nonnull
+ public Api01TranslationTask getTask() {
+ return new Api01TranslationTaskImpl(options);
+ }
+
+ private static class Api01TranslationTaskImpl implements Api01TranslationTask {
+
+ @Nonnull
+ private final Options options;
+
+ public Api01TranslationTaskImpl(@Nonnull Options options) {
+ this.options = options;
+ }
+
+ @Override
+ public void run() {
+ Jill.process(options);
+ }
+
+ }
+
+ @Override
+ public void setVerbose(boolean isVerbose) {
+ options.setVerbose(isVerbose);
+ }
+
+ @Override
+ public void setInputJavaBinaryFile(@Nonnull File input) throws ConfigurationException {
+ if (!input.exists()) {
+ throw new ConfigurationException("Input file does not exist: " + input.getPath());
+ }
+ if (!input.getAbsoluteFile().isFile()) {
+ throw new ConfigurationException("Input is not a file: " + input.getPath());
+ }
+ if (!FileUtils.isJarFile(input)) {
+ throw new ConfigurationException("Unsupported file type: " + input.getName());
+ }
+ options.setBinaryFile(input);
+ }
+
+ @Override
+ public void setOutputJackFile(@Nonnull File outputJackFile) {
+ options.setOutput(outputJackFile);
+ }
+
+ @Override
+ public void setDebugInfo(boolean debugInfo) {
+ options.setEmitDebugInfo(debugInfo);
+ }
+
+}
diff --git a/jill/tests/com/android/jill/Core.java b/jill/tests/com/android/jill/Core.java
index f799084..eb254f8 100644
--- a/jill/tests/com/android/jill/Core.java
+++ b/jill/tests/com/android/jill/Core.java
@@ -18,19 +18,24 @@ package com.android.jill;
import com.android.jack.test.TestsProperties;
import com.android.jack.test.toolchain.AbstractTestTools;
+import com.android.jill.api.JillProvider;
+import com.android.jill.api.v01.Api01Config;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ServiceLoader;
@Ignore("Tree")
public class Core {
@BeforeClass
public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
+ Core.class.getClassLoader().setDefaultAssertionStatus(true);
}
@Test
@@ -44,6 +49,27 @@ public class Core {
}
@Test
+ public void coreToJayceFromJarWithJillApi() throws Exception {
+ File jillPrebuilt = AbstractTestTools.getPrebuilt("jill");
+
+ ClassLoader classLoader = URLClassLoader.newInstance(new URL[] {jillPrebuilt.toURI().toURL()},
+ Core.class.getClassLoader());
+
+ ServiceLoader<JillProvider> serviceLoader = ServiceLoader.load(JillProvider.class, classLoader);
+ JillProvider provider = serviceLoader.iterator().next();
+
+ Api01Config config = provider.createConfig(Api01Config.class);
+
+ config.setInputJavaBinaryFile(new File(TestsProperties.getAndroidRootDir().getPath()
+ + "/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar"));
+ config.setVerbose(true);
+ config.setOutputJackFile(AbstractTestTools.createTempFile("jillTest", ".jack"));
+
+ config.getTask().run();
+ }
+
+
+ @Test
public void coreToJayceFromFolder() throws Exception {
Options options = new Options();
options.setBinaryFile(new File(TestsProperties.getAndroidRootDir().getPath()