All files / src/abap/types/basic object_reference_type.ts

100% Statements 10/10
100% Branches 0/0
100% Functions 7/7
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36  1x     1x       616x 616x       129x       2x       2x       3x       4x       49x    
import {Identifier} from "../../4_file_information/_identifier";
import {AbstractType} from "./_abstract_type";
 
// use GenericObjectReferenceType for REF TO OBJECT
export class ObjectReferenceType extends AbstractType {
  private readonly identifier: Identifier;
 
  public constructor(id: Identifier, name?: string) {
    super(name);
    this.identifier = id;
  }
 
  public getIdentifierName() {
    return this.identifier.getName();
  }
 
  public toText() {
    return "```REF TO " + this.identifier.getName() + "```";
  }
 
  public toABAP(): string {
    return "REF TO " + this.identifier.getName();
  }
 
  public isGeneric() {
    return false;
  }
 
  public containsVoid() {
    return false;
  }
 
  public getIdentifier(): Identifier {
    return this.identifier;
  }
}