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

100% Statements 36/36
100% Branches 7/7
100% Functions 7/7
100% Lines 36/36

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 361x 1x 1x 1x 1x 1x 1x 1x 685x 685x 685x 1x 1x 157x 157x 1x 1x 2x 2x 1x 1x 2x 2x 1x 1x 3x 3x 1x 1x 4x 4x 1x 1x 46x 46x 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;
  }
}