public final class AccessControlUtils
extends java.lang.Object
CheckAccessControls
Modifier | Constructor and Description |
---|---|
private |
AccessControlUtils()
Non-instantiable.
|
Modifier and Type | Method and Description |
---|---|
private static StaticSourceFile |
getDefiningSource(Node getprop,
ObjectType referenceType,
java.lang.String propertyName)
Returns the source file in which the given property is defined,
or null if it is not known.
|
(package private) static JSDocInfo.Visibility |
getEffectiveNameVisibility(Node name,
Var var,
com.google.common.collect.ImmutableMap<StaticSourceFile,JSDocInfo.Visibility> fileVisibilityMap)
Returns the effective visibility of the given name.
|
(package private) static JSDocInfo.Visibility |
getEffectivePropertyVisibility(Node property,
ObjectType referenceType,
com.google.common.collect.ImmutableMap<StaticSourceFile,JSDocInfo.Visibility> fileVisibilityMap,
CodingConvention codingConvention)
Returns the effective visibility of the given property.
|
private static JSDocInfo.Visibility |
getEffectiveVisibilityForNonOverriddenProperty(Node getprop,
ObjectType objectType,
JSDocInfo.Visibility fileOverviewVisibility,
CodingConvention codingConvention)
Returns the effective visibility of the given non-overridden property.
|
private static JSDocInfo.Visibility |
getEffectiveVisibilityForOverriddenProperty(JSDocInfo.Visibility visibility,
JSDocInfo.Visibility fileOverviewVisibility,
java.lang.String propertyName,
CodingConvention codingConvention)
Returns the effective visibility of the given overridden property.
|
private static ObjectType |
getObjectType(ObjectType referenceType,
boolean isOverride,
java.lang.String propertyName)
Returns the lowest property defined on a class with visibility information.
|
private static JSDocInfo.Visibility |
getOverriddenPropertyVisibility(ObjectType objectType,
java.lang.String propertyName)
Returns the original visibility of an overridden property.
|
static JSDocInfo.Visibility getEffectiveNameVisibility(Node name, Var var, com.google.common.collect.ImmutableMap<StaticSourceFile,JSDocInfo.Visibility> fileVisibilityMap)
@fileoverview
JsDoc specifies a default visibility.name
- The name node to compute effective visibility for.var
- The name to compute effective visibility for.fileVisibilityMap
- A map of @fileoverview
visibility
annotations, used to compute the name's default visibility.static JSDocInfo.Visibility getEffectivePropertyVisibility(Node property, ObjectType referenceType, com.google.common.collect.ImmutableMap<StaticSourceFile,JSDocInfo.Visibility> fileVisibilityMap, @Nullable CodingConvention codingConvention)
@fileoverview
JsDoc specifies
a default visibility.property
- The property to compute effective visibility for.referenceType
- The JavaScript type of the property.fileVisibilityMap
- A map of @fileoverview
visibility
annotations, used to compute the property's default visibility.codingConvention
- The coding convention in effect (if any),
used to determine whether the property is private by lexical convention
(example: trailing underscore).@Nullable private static StaticSourceFile getDefiningSource(Node getprop, @Nullable ObjectType referenceType, java.lang.String propertyName)
@Nullable private static ObjectType getObjectType(@Nullable ObjectType referenceType, boolean isOverride, java.lang.String propertyName)
private static JSDocInfo.Visibility getOverriddenPropertyVisibility(ObjectType objectType, java.lang.String propertyName)
private static JSDocInfo.Visibility getEffectiveVisibilityForOverriddenProperty(JSDocInfo.Visibility visibility, @Nullable JSDocInfo.Visibility fileOverviewVisibility, java.lang.String propertyName, @Nullable CodingConvention codingConvention)
private static JSDocInfo.Visibility getEffectiveVisibilityForNonOverriddenProperty(Node getprop, ObjectType objectType, @Nullable JSDocInfo.Visibility fileOverviewVisibility, @Nullable CodingConvention codingConvention)
@fileoverview
block, if one exists.