G-Earth/Extensions/G-Translator_1.0.2/decompiled/javax/servlet/HttpConstraintElement.java
Administrator 368b92d87a G-Earth 1.5.4 beta 22 - Initial release
Komplettes G-Earth Paket inkl. JRE, Extensions und Tools.

Extensions:
- G-BuildTools, G-Click Ultimate, G-Loader, G-Manipulate
- G-Presets, G-Translator, G-Trigger, G-itemViewer
- Market Utils, Packet Info Explorer, Plants
- RandomRoomVisitor, RoomLogger, Sanbovir Photo Inspector
- SpyFriends, WallAligner, XabboScripter, xabbo
2026-03-16 09:45:04 +01:00

59 lines
1.9 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package javax.servlet;
import javax.servlet.annotation.ServletSecurity;
public class HttpConstraintElement {
private ServletSecurity.EmptyRoleSemantic emptyRoleSemantic;
private ServletSecurity.TransportGuarantee transportGuarantee;
private String[] rolesAllowed;
public HttpConstraintElement() {
this(ServletSecurity.EmptyRoleSemantic.PERMIT);
}
public HttpConstraintElement(ServletSecurity.EmptyRoleSemantic semantic) {
this(semantic, ServletSecurity.TransportGuarantee.NONE, new String[0]);
}
public HttpConstraintElement(ServletSecurity.TransportGuarantee guarantee, String ... roleNames) {
this(ServletSecurity.EmptyRoleSemantic.PERMIT, guarantee, roleNames);
}
public HttpConstraintElement(ServletSecurity.EmptyRoleSemantic semantic, ServletSecurity.TransportGuarantee guarantee, String ... roleNames) {
if (semantic == ServletSecurity.EmptyRoleSemantic.DENY && roleNames.length > 0) {
throw new IllegalArgumentException("Deny semantic with rolesAllowed");
}
this.emptyRoleSemantic = semantic;
this.transportGuarantee = guarantee;
this.rolesAllowed = this.copyStrings(roleNames);
}
public ServletSecurity.EmptyRoleSemantic getEmptyRoleSemantic() {
return this.emptyRoleSemantic;
}
public ServletSecurity.TransportGuarantee getTransportGuarantee() {
return this.transportGuarantee;
}
public String[] getRolesAllowed() {
return this.copyStrings(this.rolesAllowed);
}
private String[] copyStrings(String[] strings) {
String[] arr = null;
if (strings != null) {
int len = strings.length;
arr = new String[len];
if (len > 0) {
System.arraycopy(strings, 0, arr, 0, len);
}
}
return arr != null ? arr : new String[]{};
}
}