# Copyright (c) 2023 Yuki Kimoto
# MIT License

class Native::Field : pointer {
  version_from SPVM;

  allow Native::BasicType;
  
  use Native::BasicType;
  
  # Fields
  has runtime : Native::Runtime;
  
  # Class Method
  private static method new_with_pointer : Native::Field ($pointer : Address, $options : object[] = undef) {
    
    my $self = new Native::Field;
    
    Fn->set_pointer($self, $pointer);
    
    return $self;
  }
  
  # Instance Methods
  native method get_index : int ();
  
  native method get_name : string ();
  
  native method get_basic_type : Native::BasicType ();
  
  native method get_type_dimension : int ();
  
  native method get_type_flag : int ();
  
  native method get_current_basic_type : Native::BasicType ();
}
