import {
  PropertyKeyType,
} from '../type';

import { AccessibleObject } from './AccessibleObject';
import { Class } from './Class';
import { Member } from './Member';

export class Field extends AccessibleObject implements Member {
  private _clazz: Class;
  private _name: PropertyKeyType;
  private _type: any;

  public constructor(declaringClazz: Class, name: PropertyKeyType, fieldType: any) {
    super();
    this._clazz = declaringClazz;
    this._name = name;
    this._type = fieldType;
  }

  public getDeclaringClass(): Class {
    return this._clazz;
  }

  public getName(): PropertyKeyType {
    return this._name;
  }

  public getType(): any {
    return this._type;
  }

}
