Skip to content

Commit

Permalink
Make some methods and fields public for inference
Browse files Browse the repository at this point in the history
  • Loading branch information
Ao-senXiong committed Feb 27, 2024
1 parent 22a3aa2 commit fd3b869
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3012,7 +3012,7 @@ protected List<AnnotatedTypeMirror> getExplicitNewClassClassTypeArgs(NewClassTre
* @param newClassTree a diamond new class tree
* @return the class type arguments for {@code newClassTree}
*/
private List<AnnotatedTypeMirror> inferDiamondType(NewClassTree newClassTree) {
public List<AnnotatedTypeMirror> inferDiamondType(NewClassTree newClassTree) {
assert TreeUtils.isDiamondTree(newClassTree) : "Expected diamond new class tree";
AnnotatedDeclaredType diamondType =
(AnnotatedDeclaredType) toAnnotatedType(TreeUtils.typeOf(newClassTree), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public abstract class AnnotatedTypeMirror implements DeepCopyable<AnnotatedTypeM
protected final AnnotatedTypeFactory atypeFactory;

/** The actual type wrapped by this AnnotatedTypeMirror. */
protected final TypeMirror underlyingType;
public final TypeMirror underlyingType;

/**
* Saves the result of {@code underlyingType.toString().hashCode()} to use when computing the
Expand Down Expand Up @@ -1260,8 +1260,7 @@ public void computeVarargType() {
*
* @param annotatedExecutableType an AnnotatedExecutableType
*/
/*package-private*/ void computeVarargType(
AnnotatedExecutableType annotatedExecutableType) {
public void computeVarargType(AnnotatedExecutableType annotatedExecutableType) {
computeVarargType(annotatedExecutableType.getParameterTypes());
}

Expand Down Expand Up @@ -1347,7 +1346,7 @@ public AnnotatedTypeMirror getReturnType() {
*
* @param receiverType the receiver type
*/
/*package-private*/ void setReceiverType(AnnotatedDeclaredType receiverType) {
public void setReceiverType(AnnotatedDeclaredType receiverType) {
this.receiverType = receiverType;
receiverTypeComputed = true;
}
Expand Down

0 comments on commit fd3b869

Please sign in to comment.