com.google.security.fences.config.MethodFence Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fences-maven-enforcer-rule Show documentation
Show all versions of fences-maven-enforcer-rule Show documentation
Augments Java's access control by checking that a Maven Project and all its
dependencies conform to a policy that specifies which classes/packages can
link to which others.
package com.google.security.fences.config;
import com.google.security.fences.policy.ApiElement;
import com.google.security.fences.policy.ApiElementType;
/**
* A fence for all methods with a given name in a class regardless of
* parameter, return type and other non-name based signature elements.
*/
public final class MethodFence extends NamedLeafFence {
@Override
void visit(FenceVisitor v, ApiElement el) {
v.visit(this, el.child(getName(), ApiElementType.METHOD));
}
@Override
protected void addToClass(ClassFence container) {
container.setMethod(this);
}
@Override
String getConfigurationElementName() {
return "method";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy