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 1243x 1243x 1243x 1x 1x 352x 352x 1x 1x 3x 3x 1x 1x 8x 8x 1x 1x 170x 170x 1x 1x 7x 7x 1x 1x 176x 176x 1x 1x     1x
import {Identifier} from "../../4_file_information/_identifier";
import {AbstractType, AbstractTypeData} from "./_abstract_type";
 
// use GenericObjectReferenceType for REF TO OBJECT
export class ObjectReferenceType extends AbstractType {
  private readonly identifier: Identifier;
 
  public constructor(id: Identifier, extra?: AbstractTypeData) {
    super(extra);
    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";
  }
}