Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
12 changed files
with
1,522 additions
and
821 deletions.
There are no files selected for viewing
680 changes: 342 additions & 338 deletions
680
generator/src/org/immutables/generator/SourceExtraction.java
Large diffs are not rendered by default.
Oops, something went wrong.
572 changes: 281 additions & 291 deletions
572
value-processor/src/org/immutables/value/processor/encode/Code.java
Large diffs are not rendered by default.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
value-processor/src/org/immutables/value/processor/encode/DefaultTypeFactory.java
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
value-processor/src/org/immutables/value/processor/encode/EncodedElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.immutables.value.processor.encode; | ||
|
||
import java.util.List; | ||
import org.immutables.generator.Naming; | ||
import org.immutables.value.Value; | ||
import org.immutables.value.Value.Enclosing; | ||
import org.immutables.value.Value.Immutable; | ||
import org.immutables.value.processor.encode.Code.Term; | ||
|
||
@Immutable | ||
@Enclosing | ||
interface EncodedElement { | ||
String name(); | ||
Type type(); | ||
Naming naming(); | ||
List<Param> params(); | ||
List<Term> code(); | ||
|
||
class Builder extends ImmutableEncodedElement.Builder {} | ||
|
||
@Immutable | ||
interface Param { | ||
@Value.Parameter | ||
String name(); | ||
@Value.Parameter | ||
Type type(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
value-processor/src/org/immutables/value/processor/encode/Structurizer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package org.immutables.value.processor.encode; | ||
|
||
import com.google.common.collect.Iterators; | ||
import com.google.common.collect.PeekingIterator; | ||
import java.util.List; | ||
import org.immutables.value.processor.encode.Code.Term; | ||
|
||
final class Structurizer { | ||
private final PeekingIterator<Term> terms; | ||
|
||
Structurizer(Iterable<Term> terms) { | ||
this.terms = Iterators.peekingIterator(terms.iterator()); | ||
} | ||
|
||
void structurize() { | ||
|
||
while (terms.hasNext()) { | ||
statement(); | ||
} | ||
} | ||
|
||
private void statement() { | ||
while (terms.hasNext()) { | ||
Term t = terms.next(); | ||
|
||
} | ||
} | ||
|
||
interface CompilationUnit { | ||
List<Statement> statements(); | ||
} | ||
|
||
interface Statement { | ||
List<Term> body(); | ||
} | ||
|
||
interface Elem { | ||
|
||
} | ||
|
||
interface Params { | ||
|
||
} | ||
|
||
interface Annotation extends Elem { | ||
|
||
} | ||
} |
Oops, something went wrong.