protected Level createEmptyLevelFromType ( final int lineNumber , final LevelType levelType , final String input ) { // Create the level based on the type switch ( levelType ) { case APPENDIX : return new Appendix ( null , lineNumber , input ) ; case CHAPTER : return new Chapter ( null , lineNumber , input ) ; case SECTION : return new Section ( null , lineNumber , input ) ; case PART : return new Part ( null , lineNumber , input ) ; case PROCESS : return new Process ( null , lineNumber , input ) ; case INITIAL_CONTENT : return new InitialContent ( lineNumber , input ) ; default : return new Level ( null , lineNumber , input , levelType ) ; } }
Creates an empty Level using the LevelType to determine which Level subclass to instantiate .