Interface InheritanceOriginMetadata
-
@NonExtendable public interface InheritanceOriginMetadata
Node metadata indicating where a node was inherited from.
-
-
Field Summary
Fields Modifier and Type Field Description static NodeMetadataKey<InheritanceOriginMetadata>KEYTheNodeMetadataKeyforInheritanceOriginMetadata.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NonNull PermissionHolder.IdentifiergetOrigin()Gets the location where theNodeis inherited from.default booleanwasInherited(@NonNull PermissionHolder.Identifier holder)Gets whether the associated node was inherited from another holder.
-
-
-
Field Detail
-
KEY
static final NodeMetadataKey<InheritanceOriginMetadata> KEY
TheNodeMetadataKeyforInheritanceOriginMetadata.
-
-
Method Detail
-
getOrigin
@NonNull PermissionHolder.Identifier getOrigin()
Gets the location where theNodeis inherited from.The resultant string is the
object nameof the permission holder the node was inherited from.If the node was not inherited, the
object nameof the permission holder itself (the one that defined the node) will be returned.- Returns:
- where the node was inherited from.
-
wasInherited
default boolean wasInherited(@NonNull PermissionHolder.Identifier holder)
Gets whether the associated node was inherited from another holder.In other terms, it returns whether the origin is not equal to the given holder.
- Parameters:
holder- the holder defining the node- Returns:
- if true the node was inherited, false if it was defined by the same holder
- Since:
- 5.3
-
-