diff --git a/src/main/java/com/klaroworks/runtime/role/Nested.java b/src/main/java/com/klaroworks/runtime/role/Nested.java new file mode 100644 index 0000000..e70ad38 --- /dev/null +++ b/src/main/java/com/klaroworks/runtime/role/Nested.java @@ -0,0 +1,46 @@ +package com.klaroworks.runtime.role; + +/** + * Nested class definition for role testing. + * Used by RoleMatrixRuntimeTest for nested class access testing. + */ +public class Nested { + + public static class InnerRole { + private final String roleName; + private final int priority; + + public InnerRole(String roleName, int priority) { + this.roleName = roleName; + this.priority = priority; + } + + public String getRoleName() { + return roleName; + } + + public int getPriority() { + return priority; + } + + @Override + public String toString() { + return "InnerRole{roleName='" + roleName + "', priority=" + priority + "}"; + } + } + + public static class RoleLevel { + public static final int ADMIN = 100; + public static final int MANAGER = 50; + public static final int USER = 10; + public static final int GUEST = 1; + + private RoleLevel() { + // Prevent instantiation + } + } + + public static InnerRole createRole(String name, int priority) { + return new InnerRole(name, priority); + } +}