@@ -106,8 +106,8 @@ public void addASuperTypeRelationship() {
106
106
.addType (subTypeColor .getExpectedTypeProto ())
107
107
.addDisambiguationEdges (
108
108
SubtypingEdge .newBuilder ()
109
- .setSubtype (subTypeColor .getExpectedTypePointer ())
110
- .setSupertype (superTypeColor .getExpectedTypePointer ())
109
+ .setSubtype (subTypeColor .expectedTypePointer ())
110
+ .setSupertype (superTypeColor .expectedTypePointer ())
111
111
.build ())
112
112
// empty DebugInfo
113
113
.setDebugInfo (TypePool .DebugInfo .getDefaultInstance ())
@@ -144,8 +144,8 @@ public void implicitAdditionOfSuperType() {
144
144
.addType (superTypeColor .getExpectedTypeProto ())
145
145
.addDisambiguationEdges (
146
146
SubtypingEdge .newBuilder ()
147
- .setSubtype (subTypeColor .getExpectedTypePointer ())
148
- .setSupertype (superTypeColor .getExpectedTypePointer ())
147
+ .setSubtype (subTypeColor .expectedTypePointer ())
148
+ .setSupertype (superTypeColor .expectedTypePointer ())
149
149
.build ())
150
150
// DebugInfo is present but empty.
151
151
.setDebugInfo (TypePool .DebugInfo .getDefaultInstance ())
@@ -256,18 +256,18 @@ public void simulatedClasses() {
256
256
.addType (childClassPrototypeTestColor .getExpectedTypeProto ())
257
257
.addDisambiguationEdges (
258
258
SubtypingEdge .newBuilder ()
259
- .setSubtype (childClassConstructorTestColor .getExpectedTypePointer ())
260
- .setSupertype (baseClassConstructorTestColor .getExpectedTypePointer ())
259
+ .setSubtype (childClassConstructorTestColor .expectedTypePointer ())
260
+ .setSupertype (baseClassConstructorTestColor .expectedTypePointer ())
261
261
.build ())
262
262
.addDisambiguationEdges (
263
263
SubtypingEdge .newBuilder ()
264
- .setSubtype (childClassInstanceTestColor .getExpectedTypePointer ())
265
- .setSupertype (baseClassInstanceTestColor .getExpectedTypePointer ())
264
+ .setSubtype (childClassInstanceTestColor .expectedTypePointer ())
265
+ .setSupertype (baseClassInstanceTestColor .expectedTypePointer ())
266
266
.build ())
267
267
.addDisambiguationEdges (
268
268
SubtypingEdge .newBuilder ()
269
- .setSubtype (childClassPrototypeTestColor .getExpectedTypePointer ())
270
- .setSupertype (baseClassPrototypeTestColor .getExpectedTypePointer ())
269
+ .setSubtype (childClassPrototypeTestColor .expectedTypePointer ())
270
+ .setSupertype (baseClassPrototypeTestColor .expectedTypePointer ())
271
271
.build ())
272
272
// DebugInfo is present but empty.
273
273
.setDebugInfo (TypePool .DebugInfo .getDefaultInstance ())
@@ -392,11 +392,11 @@ public void filterPropertyNames() {
392
392
.addPooledString (droppedPropertyName )
393
393
.addColor (testColor )
394
394
.generateTypePool ()
395
- .getTypePool ();
395
+ .typePool ();
396
396
397
397
final List <Integer > ownPropertyList =
398
398
actualTypePool .getType (0 ).getObject ().getOwnPropertyList ();
399
- assertThat (ownPropertyList ).containsExactly (keptPropertyName .getPoolOffset ());
399
+ assertThat (ownPropertyList ).containsExactly (keptPropertyName .poolOffset ());
400
400
}
401
401
402
402
@ Test
@@ -565,11 +565,11 @@ TestColor build() {
565
565
.setConstructor (isConstructor )
566
566
.setClosureAssert (isClosureAssert )
567
567
.setInstanceColors (
568
- instanceTestColors .stream ().map (TestColor ::getColor ).collect (toImmutableSet ()))
568
+ instanceTestColors .stream ().map (TestColor ::color ).collect (toImmutableSet ()))
569
569
.setPrototypes (
570
- prototypeTestColors .stream ().map (TestColor ::getColor ).collect (toImmutableSet ()))
570
+ prototypeTestColors .stream ().map (TestColor ::color ).collect (toImmutableSet ()))
571
571
.setOwnProperties (
572
- ownProperties .stream ().map (PooledString ::getValue ).collect (toImmutableSet ()));
572
+ ownProperties .stream ().map (PooledString ::value ).collect (toImmutableSet ()));
573
573
final Integer typePointer = TypePointers .untrimOffset (trimmedPoolOffset );
574
574
final TypeProto .Builder typeProtoBuilder = TypeProto .newBuilder ();
575
575
final ObjectTypeProto .Builder objectTypeProtoBuilder = typeProtoBuilder .getObjectBuilder ();
@@ -581,14 +581,14 @@ TestColor build() {
581
581
.setClosureAssert (isClosureAssert )
582
582
.addAllInstanceType (
583
583
instanceTestColors .stream ()
584
- .map (TestColor ::getExpectedTypePointer )
584
+ .map (TestColor ::expectedTypePointer )
585
585
.collect (Collectors .toList ()))
586
586
.addAllPrototype (
587
587
prototypeTestColors .stream ()
588
- .map (TestColor ::getExpectedTypePointer )
588
+ .map (TestColor ::expectedTypePointer )
589
589
.collect (Collectors .toList ()))
590
590
.addAllOwnProperty (
591
- ownProperties .stream ().map (PooledString ::getPoolOffset ).collect (Collectors .toList ()));
591
+ ownProperties .stream ().map (PooledString ::poolOffset ).collect (Collectors .toList ()));
592
592
return TestColor .create (colorBuilder .build (), typeProtoBuilder .build (), typePointer );
593
593
}
594
594
}
@@ -612,14 +612,14 @@ TestUnionColorBuilder addTestColor(TestColor testColor) {
612
612
TestColor build () {
613
613
checkState (trimmedPoolOffset >= 0 , "call setTrimmedPoolOffset() first" );
614
614
final ImmutableSet <Color > memberColors =
615
- memberTestColors .stream ().map (TestColor ::getColor ).collect (toImmutableSet ());
615
+ memberTestColors .stream ().map (TestColor ::color ).collect (toImmutableSet ());
616
616
Color color = Color .createUnion (memberColors );
617
617
618
618
final Integer typePointer = TypePointers .untrimOffset (trimmedPoolOffset );
619
619
620
620
final List <Integer > memberTypePoiners =
621
621
memberTestColors .stream ()
622
- .map (TestColor ::getExpectedTypePointer )
622
+ .map (TestColor ::expectedTypePointer )
623
623
.collect (Collectors .toList ());
624
624
final TypeProto .Builder typeProtoBuilder = TypeProto .newBuilder ();
625
625
typeProtoBuilder .getUnionBuilder ().addAllUnionMember (memberTypePoiners );
@@ -669,7 +669,7 @@ public int getExpectedTypePointer() {
669
669
// The Integer we expect ColorSerializer to create for this Color.
670
670
671
671
public TypeProto getExpectedTypeProto () {
672
- return checkNotNull (getNullableExpectedTypeProto ());
672
+ return checkNotNull (nullableExpectedTypeProto ());
673
673
}
674
674
675
675
static TestColor create (
@@ -698,16 +698,14 @@ public ImmutableList<TestColor> getTestColors() {
698
698
}
699
699
700
700
public List <Color > getColors () {
701
- return getTestColors ().stream ().map (TestColor ::getColor ).collect (Collectors .toList ());
701
+ return testColors ().stream ().map (TestColor ::color ).collect (Collectors .toList ());
702
702
}
703
703
704
704
public TypePool .DebugInfo .Mismatch getExpectedMismatch () {
705
705
final List <Integer > involvedColorTypePointers =
706
- getTestColors ().stream ()
707
- .map (TestColor ::getExpectedTypePointer )
708
- .collect (Collectors .toList ());
706
+ testColors ().stream ().map (TestColor ::expectedTypePointer ).collect (Collectors .toList ());
709
707
return TypePool .DebugInfo .Mismatch .newBuilder ()
710
- .setSourceRef (getLocationString ())
708
+ .setSourceRef (locationString ())
711
709
.addAllInvolvedColor (involvedColorTypePointers )
712
710
.build ();
713
711
}
@@ -766,9 +764,9 @@ Tester init() {
766
764
767
765
/** Be prepared to respond to a request for this string. */
768
766
Tester addPooledString (PooledString pooledString ) {
769
- final String string = pooledString .getValue ();
767
+ final String string = pooledString .value ();
770
768
checkState (!stringToPoolOffsetMap .containsKey (string ), "duplicate string added: %s" , string );
771
- stringToPoolOffsetMap .put (string , pooledString .getPoolOffset ());
769
+ stringToPoolOffsetMap .put (string , pooledString .poolOffset ());
772
770
return this ;
773
771
}
774
772
@@ -778,20 +776,20 @@ Tester linkSubColorToSuperColor(Color subColor, Color superColor) {
778
776
}
779
777
780
778
Tester linkSubColorToSuperColor (TestColor subColor , TestColor superColor ) {
781
- return linkSubColorToSuperColor (subColor .getColor (), superColor .getColor ());
779
+ return linkSubColorToSuperColor (subColor .color (), superColor .color ());
782
780
}
783
781
784
782
Tester addMismatch (TestMismatch testMismatch ) {
785
- final String locationString = testMismatch .getLocationString ();
783
+ final String locationString = testMismatch .locationString ();
786
784
for (Color color : testMismatch .getColors ()) {
787
785
colorToMismatchLocationStringsMap .put (color , locationString );
788
786
}
789
787
return this ;
790
788
}
791
789
792
790
Tester addColor (TestColor testColor ) {
793
- final Integer typePointer = colorSerializer .addColor (testColor .getColor ());
794
- assertThat (typePointer ).isEqualTo (testColor .getExpectedTypePointer ());
791
+ final Integer typePointer = colorSerializer .addColor (testColor .color ());
792
+ assertThat (typePointer ).isEqualTo (testColor .expectedTypePointer ());
795
793
return this ;
796
794
}
797
795
@@ -802,10 +800,10 @@ Tester addColors(TestColor... testColors) {
802
800
Tester addColors (List <TestColor > testColorList ) {
803
801
checkNotNull (colorSerializer , "call init() first" );
804
802
final List <Color > colors =
805
- testColorList .stream ().map (TestColor ::getColor ).collect (Collectors .toList ());
803
+ testColorList .stream ().map (TestColor ::color ).collect (Collectors .toList ());
806
804
final ImmutableList <Integer > typePointers = colorSerializer .addColors (colors );
807
805
for (int i = 0 ; i < testColorList .size (); ++i ) {
808
- assertThat (typePointers .get (i )).isEqualTo (testColorList .get (i ).getExpectedTypePointer ());
806
+ assertThat (typePointers .get (i )).isEqualTo (testColorList .get (i ).expectedTypePointer ());
809
807
}
810
808
return this ;
811
809
}
@@ -832,7 +830,7 @@ public TypePool getTypePool() {
832
830
}
833
831
834
832
ProtoSubject assertThatTypePool () {
835
- return assertThat (getTypePool ());
833
+ return assertThat (typePool ());
836
834
}
837
835
838
836
static GenerateTypePoolTestResult create (TypePool typePool ) {
0 commit comments