private MustacheTagType identifyTagType(String buffer) {

        if (buffer.length() == 0) {
            return MustacheTagType.VARIABLE;
        }

        // Triple mustache is supported for default delimiters only
        if (delimiters.hasDefaultDelimitersSet()
                && buffer.charAt(0) == ((String) EngineConfigurationKey.START_DELIMITER
                        .getDefaultValue()).charAt(0)
                && buffer.charAt(buffer.length() - 1) == ((String) EngineConfigurationKey.END_DELIMITER
                        .getDefaultValue()).charAt(0)) {
            return MustacheTagType.UNESCAPE_VARIABLE;
        }

        Character command = buffer.charAt(0);

        for (MustacheTagType type : MustacheTagType.values()) {
            if (command.equals(type.getCommand())) {
                return type;
            }
        }
        return MustacheTagType.VARIABLE;
    }
private MustacheTagType identifyTagType(String buffer) {

        if (buffer.length() == 0) {
            return MustacheTagType.VARIABLE;
        }

        
        if (delimiters.hasDefaultDelimitersSet()
                && buffer.charAt(0) == ((String) EngineConfigurationKey.START_DELIMITER
                        .getDefaultValue()).charAt(0)
                && buffer.charAt(buffer.length() - 1) == ((String) EngineConfigurationKey.END_DELIMITER
                        .getDefaultValue()).charAt(0)) {
            return MustacheTagType.UNESCAPE_VARIABLE;
        }

        Character command = buffer.charAt(0);

        for (MustacheTagType type : MustacheTagType.values()) {
            if (command.equals(type.getCommand())) {
                return type;
            }
        }
        return MustacheTagType.VARIABLE;
    }
private MustacheTagType identifyTagType ( String buffer ) { if ( buffer . length ( ) == 0 ) { return MustacheTagType . VARIABLE ; } // Triple mustache is supported for default delimiters only if ( delimiters . hasDefaultDelimitersSet ( ) && buffer . charAt ( 0 ) == ( ( String ) EngineConfigurationKey . START_DELIMITER . getDefaultValue ( ) ) . charAt ( 0 ) && buffer . charAt ( buffer . length ( ) - 1 ) == ( ( String ) EngineConfigurationKey . END_DELIMITER . getDefaultValue ( ) ) . charAt ( 0 ) ) { return MustacheTagType . UNESCAPE_VARIABLE ; } Character command = buffer . charAt ( 0 ) ; for ( MustacheTagType type : MustacheTagType . values ( ) ) { if ( command . equals ( type . getCommand ( ) ) ) { return type ; } } return MustacheTagType . VARIABLE ; }
Identify the tag type (variable, comment, etc.).

@param buffer
@param delimiters
@return the tag type
Identify the tag type ( variable comment etc . ) .