Class RestrictionChecker.DuplicateNameChecker

    • Field Detail

      • expsLen

        protected int expsLen
        Number of items in the atts array.
      • areas

        protected int[] areas
        areas.

        An area is a range of index designated by the start and end. Areas are stored as:

        { start, end, start, end, ... }

        The start method gives the index. The endLeftBranch method creates an area by using the start index given by the start method. The endRightBranch method will remove the area.

        When testing duplicate attributes, areas are created by ChoiceExp and used to exclude test candidates (as two attributes can share the same name if they are in different branches of choice.)

        When testing duplicate elements, areas are created by InterleaveExp and used to include test candidates (as two elements cannot share the same name if they are in different branches of interleave.)

      • areaLen

        protected int areaLen
      • checker

        private final NameClassCollisionChecker checker
        Name class checker object. One object is reused throughout the test.
    • Constructor Detail

      • DuplicateNameChecker

        protected DuplicateNameChecker()
    • Method Detail

      • check

        protected abstract void check​(NameClassAndExpression exp)
        tests a given exp against existing expressions (which are stored in the exps field.)
      • start

        public int start()
      • endLeftBranch

        public void endLeftBranch​(int start)
      • endRightBranch

        public void endRightBranch()
      • getErrorMessage

        protected abstract java.lang.String getErrorMessage()
        Gets the error message resource name.