Java: Make Guava stuff private

This commit is contained in:
Joe
2020-10-01 15:17:00 +01:00
committed by Joe Farebrother
parent 28647b20e2
commit fc4d7c3161
4 changed files with 10 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
import java
import Strings
import Splitter
import Joiner
private import Strings
private import Splitter
private import Joiner
/**
* A method in the guava framework that propegates taint.

View File

@@ -31,7 +31,8 @@ private class GuavaJoinerMethod extends Method {
/**
* A method that builds a `Joiner` or `MapJoiner`.
*/
class GuavaJoinerBuilderMethod extends GuavaJoinerMethod, GuavaTaintPropagationMethodToReturn {
private class GuavaJoinerBuilderMethod extends GuavaJoinerMethod,
GuavaTaintPropagationMethodToReturn {
GuavaJoinerBuilderMethod() {
// static Joiner on(char separator)
// static Joiner on(String separator)
@@ -48,7 +49,7 @@ class GuavaJoinerBuilderMethod extends GuavaJoinerMethod, GuavaTaintPropagationM
/**
* An `appendTo` method on `Joiner` or `MapJoiner`
*/
class GuavaJoinerAppendToMethod extends GuavaJoinerMethod, GuavaTaintPropagationMethod {
private class GuavaJoinerAppendToMethod extends GuavaJoinerMethod, GuavaTaintPropagationMethod {
GuavaJoinerAppendToMethod() {
// <A extends Appendable> A appendTo(A appendable, Iterable<?> parts)
// <A extends Appendable> A appendTo(A appendable, Iterator<?> parts)
@@ -77,7 +78,7 @@ class GuavaJoinerAppendToMethod extends GuavaJoinerMethod, GuavaTaintPropagation
/**
* A `join` method on `Joiner` or `MapJoiner`
*/
class GuavaJoinMethod extends GuavaJoinerMethod, GuavaTaintPropagationMethodToReturn {
private class GuavaJoinMethod extends GuavaJoinerMethod, GuavaTaintPropagationMethodToReturn {
GuavaJoinMethod() {
// String join(Iterable<?> parts)
// String join(Iterator<?> parts)

View File

@@ -21,7 +21,7 @@ class TypeGuavaMapSplitter extends NestedClass {
/**
* A method of `Splitter` or `MapSplitter` that splits its input string.
*/
class GuavaSplitMethod extends GuavaTaintPropagationMethodToReturn {
private class GuavaSplitMethod extends GuavaTaintPropagationMethodToReturn {
GuavaSplitMethod() {
(
this.getDeclaringType() instanceof TypeGuavaSplitter

View File

@@ -11,7 +11,7 @@ class TypeGuavaStrings extends Class {
/**
* A Guava string utility method that preserves taint from its first argument.
*/
class GuavaStringsTaintPropagationMethod extends GuavaTaintPropagationMethodToReturn {
private class GuavaStringsTaintPropagationMethod extends GuavaTaintPropagationMethodToReturn {
GuavaStringsTaintPropagationMethod() {
this.getDeclaringType() instanceof TypeGuavaStrings and
// static String emptyToNull(String string)
@@ -28,7 +28,7 @@ class GuavaStringsTaintPropagationMethod extends GuavaTaintPropagationMethodToRe
/**
* The method `Strings.lenientFormat`.
*/
class GuavaStringsFormatMethod extends GuavaTaintPropagationMethodToReturn {
private class GuavaStringsFormatMethod extends GuavaTaintPropagationMethodToReturn {
GuavaStringsFormatMethod() {
this.getDeclaringType() instanceof TypeGuavaStrings and
// static String lenientFormat(String template, Object ... args)