![JAR search and dependency download from the Maven repository](/logo.png)
jreversepro.reflect.method.JSwitchBlock Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-utils Show documentation
Show all versions of commons-utils Show documentation
Common utilities is a set of java utilities for managing typical actions when working with enums,
files, exceptions, zip/jar files, classes (via Reflection), maps, numbers and so on.
Most of the utilities extend functionalities offered by amazing libraries such as:
* commons-beanutils (apache)
* commons-lang3 (apache)
* commons-io (apache)
* commons-math3 (apache)
* commons-collections4 (apache)
* jreversepro (akkumar)
/*
* JSwitchBlock.java
*
* Created on September 5, 2002, 4:56 PM
*/
package jreversepro.reflect.method;
import jreversepro.revengine.JBranchEntry;
/**
* @author [email protected], Copyright 2002.
*/
public class JSwitchBlock extends JBlockObject {
/**
* Contains stringified switch expression
*/
private final String expr;
/**
* Creates a new instance of JSwitchBlock
*
* @param _jbe Branch
* @param _expr The expression
*/
public JSwitchBlock(JBranchEntry _jbe, String _expr) {
/*
Associated Branch Entry
*/
expr = _expr;
}
/**
* Outputs any starting code to open the block
*
* @return The starting code to open the block
*/
protected String getEntryCode() {
return "switch (" + expr + ") {\n";
}
/**
* Outputs any terminating code to close the block
*/
protected String getExitCode() {
return "\n" + indent + "}\n";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy