Skip to content

Commit

Permalink
Deprecate the APIs used to configure the StripCode pass, and make the…
Browse files Browse the repository at this point in the history
… CompilerOptions#strip* members package private.

PiperOrigin-RevId: 351836589
  • Loading branch information
concavelenz authored and Copybara-Service committed Jan 14, 2021
1 parent 44b921b commit 79ced4f
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/com/google/javascript/jscomp/CompilerOptions.java
Expand Up @@ -739,13 +739,13 @@ public void setReplaceMessagesWithChromeI18n(
public boolean gatherCssNames;

/** Names of types to strip */
public Set<String> stripTypes;
ImmutableSet<String> stripTypes;

/** Name suffixes that determine which variables and properties to strip */
public Set<String> stripNameSuffixes;
ImmutableSet<String> stripNameSuffixes;

/** Name prefixes that determine which variables and properties to strip */
public Set<String> stripNamePrefixes;
ImmutableSet<String> stripNamePrefixes;

/** Custom passes */
protected transient Multimap<CustomPassExecutionTime, CompilerPass> customPasses;
Expand Down Expand Up @@ -2264,16 +2264,28 @@ public void setGatherCssNames(boolean gatherCssNames) {
this.gatherCssNames = gatherCssNames;
}

/** @deprecated StripCode is deprecated. Code should be designed to be removed by other means. */
@Deprecated
public void setStripTypes(Set<String> stripTypes) {
this.stripTypes = stripTypes;
this.stripTypes = ImmutableSet.copyOf(stripTypes);
}

/** @deprecated StripCode is deprecated. Code should be designed to be removed by other means. */
@Deprecated
public ImmutableSet<String> getStripTypes() {
return ImmutableSet.copyOf(this.stripTypes);
}

/** @deprecated StripCode is deprecated. Code should be designed to be removed by other means. */
@Deprecated
public void setStripNameSuffixes(Set<String> stripNameSuffixes) {
this.stripNameSuffixes = stripNameSuffixes;
this.stripNameSuffixes = ImmutableSet.copyOf(stripNameSuffixes);
}

/** @deprecated StripCode is deprecated. Code should be designed to be removed by other means. */
@Deprecated
public void setStripNamePrefixes(Set<String> stripNamePrefixes) {
this.stripNamePrefixes = stripNamePrefixes;
this.stripNamePrefixes = ImmutableSet.copyOf(stripNamePrefixes);
}

public void addCustomPass(CustomPassExecutionTime time, CompilerPass customPass) {
Expand Down

0 comments on commit 79ced4f

Please sign in to comment.