pub struct ClassType {
pub name: SharedString,
pub package: Option<SharedString>,
pub type_args: Vec<TypeId>,
pub superclass: Option<TypeId>,
pub interfaces: Vec<TypeId>,
pub methods: HashMap<SharedString, Vec<MethodId>>,
pub fields: HashMap<SharedString, Vec<FieldId>>,
}Fields§
§name: SharedStringSimple class name (without package).
package: Option<SharedString>Package name or None for the default package.
type_args: Vec<TypeId>Type arguments applied to this class type.
superclass: Option<TypeId>Superclass type id, if any.
interfaces: Vec<TypeId>Implemented interface type ids.
methods: HashMap<SharedString, Vec<MethodId>>Method ids grouped by name for overload resolution.
fields: HashMap<SharedString, Vec<FieldId>>Field ids grouped by name.
Implementations§
Source§impl ClassType
impl ClassType
pub fn new(name: SharedString) -> Self
pub fn with_package(self, package_: SharedString) -> Self
pub fn with_type_args(self, type_args: Vec<TypeId>) -> Self
pub fn with_superclass(self, superclass: TypeId) -> Self
pub fn with_interfaces(self, interfaces: Vec<TypeId>) -> Self
pub fn with_methods(self, methods: HashMap<SharedString, Vec<MethodId>>) -> Self
pub fn with_fields(self, fields: HashMap<SharedString, Vec<FieldId>>) -> Self
pub fn add_method(&mut self, name: SharedString, method_id: MethodId)
pub fn add_field(&mut self, name: SharedString, field_id: FieldId)
pub fn internal_name(&self) -> String
Trait Implementations§
impl StructuralPartialEq for ClassType
Auto Trait Implementations§
impl Freeze for ClassType
impl RefUnwindSafe for ClassType
impl Send for ClassType
impl Sync for ClassType
impl Unpin for ClassType
impl UnsafeUnpin for ClassType
impl UnwindSafe for ClassType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more