All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jreversepro.reflect.method.JElseBlock Maven / Gradle / Ivy

/*
 * JElseBlock.java
 *
 * Created on September 4, 2002, 2:53 PM
 * JReversePro - Java Decompiler / Disassembler.
 * Copyright (C) 2002 [email protected]
 * EMail: [email protected]
 *
 * This program is free software; you can redistribute it and/or modify
 * it , under the terms of the GNU General   License as published
 * by the Free Software Foundation; either version 2 of the License,
 * or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General   License for more details.
 * You should have received a copy of the GNU General   License
 * along with this program.If not, write to
 *  The Free Software Foundation, Inc.,
 *  59 Temple Place - Suite 330,
 *  Boston, MA 02111-1307, USA.
 */

package jreversepro.reflect.method;

import jreversepro.revengine.JBranchEntry;

/**
 * @author [email protected] -- Copyright 2002.
 */
public class JElseBlock extends JBlockObject {

    /**
     * Creates a new instance of JElseBranch
     *
     * @param _jbe Branch
     */
    public JElseBlock(JBranchEntry _jbe) {
        /*
      Associated Branch Entry
     */
    }

    /**
     * Outputs any starting code to open the block
     *
     * @return The starting code to open the block
     */
    protected String getEntryCode() {
        if (isSimpleBlock()) {
            return "else\n";
        } else {
            return "else {\n";
        }
    }

    /**
     * Outputs any terminating code to close the block
     */
    protected String getExitCode() {
        if (isSimpleBlock()) {
            return "\n";
        } else {
            return "}\n";
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy