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

95% Statements 38/40
100% Branches 7/7
87.5% Functions 7/8
95% Lines 38/40

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 37 38 39 401x 1x 1x 1x 1x 1x 1x 1x 821x 821x 821x 1x 1x 190x 190x 1x 1x 2x 2x 1x 1x 5x 5x 1x 1x 6x 6x 1x 1x 5x 5x 1x 1x 115x 115x 1x 1x     1x
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, qualifiedName?: string) {
    super(qualifiedName);
    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;
  }
 
  public toCDS() {
    return "abap.TODO_OBJECTREF";
  }
}