pub struct InheritanceReflection {
pub direct_implemented_interfaces: HashSet<Name>,
pub all_implemented_interfaces: HashSet<Name>,
pub direct_extended_class: Option<Name>,
pub all_extended_classes: HashSet<Name>,
pub direct_extended_interfaces: HashSet<Name>,
pub all_extended_interfaces: HashSet<Name>,
pub require_implementations: HashSet<StringIdentifier>,
pub require_extensions: HashSet<StringIdentifier>,
pub children: HashSet<ClassLikeName>,
pub names: HashMap<StringIdentifier, Name>,
}Expand description
Represents the inheritance details of a class-like entity, including implemented interfaces, extended classes or interfaces, and any required inheritance constraints.
Fields§
§direct_implemented_interfaces: HashSet<Name>Interfaces directly implemented by the current class or enum.
all_implemented_interfaces: HashSet<Name>All interfaces implemented by the current class or any of its ancestors,
including direct_implemented_interfaces.
direct_extended_class: Option<Name>The class directly extended by the current class, if applicable.
all_extended_classes: HashSet<Name>All classes extended by the current class or any of its ancestors,
including direct_extended_class.
direct_extended_interfaces: HashSet<Name>Interfaces directly extended by the current interface, if applicable.
all_extended_interfaces: HashSet<Name>All interfaces extended by the current interface or any of its ancestors,
including direct_extended_interfaces.
require_implementations: HashSet<StringIdentifier>Interfaces that the current class-like entity requires any inheriting entity to implement,
as specified by the @require-implements tag.
require_extensions: HashSet<StringIdentifier>Classes or interfaces that the current class-like entity requires any inheriting entity to extend,
as specified by the @require-extends tag.
children: HashSet<ClassLikeName>Identifiers of class-like entities that directly extend or implement the current class-like entity.
names: HashMap<StringIdentifier, Name>A lookup map of string identifiers to class-like names.
Implementations§
Source§impl InheritanceReflection
impl InheritanceReflection
pub fn implements_interfaces(&self) -> bool
pub fn extends_classes(&self) -> bool
pub fn has_children(&self) -> bool
pub fn is_instance_of( &self, interner: &ThreadedInterner, other: &ClassLikeReflection, ) -> bool
pub fn extends_class( &self, interner: &ThreadedInterner, other: &ClassLikeReflection, ) -> bool
pub fn extends_class_with_name( &self, interner: &ThreadedInterner, other: &StringIdentifier, ) -> bool
pub fn extends_interface( &self, interner: &ThreadedInterner, other: &ClassLikeReflection, ) -> bool
pub fn extends_interface_with_name( &self, interner: &ThreadedInterner, other: &StringIdentifier, ) -> bool
pub fn implements_interface( &self, interner: &ThreadedInterner, other: &ClassLikeReflection, ) -> bool
pub fn implements_interface_with_name( &self, interner: &ThreadedInterner, other: &StringIdentifier, ) -> bool
Trait Implementations§
Source§impl Clone for InheritanceReflection
impl Clone for InheritanceReflection
Source§fn clone(&self) -> InheritanceReflection
fn clone(&self) -> InheritanceReflection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more