/** * Return the checked exceptions information for the method. * Acts internally through the {@link Attributes} interface. * * @param add if true, a new exceptions attribute will be added * if not already present * @return the exceptions information, or null if none and the * <code>add</code> param is set to false */ public Exceptions getExceptions(boolean add) { Exceptions exceptions = (Exceptions) getAttribute (Constants.ATTR_EXCEPTIONS); if (!add || (exceptions != null)) return exceptions; if (exceptions == null) exceptions = (Exceptions) addAttribute(Constants.ATTR_EXCEPTIONS); return exceptions; }
/** * Return the checked exceptions information for the method. * Acts internally through the {@link Attributes} interface. * * @param add if true, a new exceptions attribute will be added * if not already present * @return the exceptions information, or null if none and the * <code>add</code> param is set to false */ public Exceptions getExceptions(boolean add) { Exceptions exceptions = (Exceptions) getAttribute (Constants.ATTR_EXCEPTIONS); if (!add || (exceptions != null)) return exceptions; if (exceptions == null) exceptions = (Exceptions) addAttribute(Constants.ATTR_EXCEPTIONS); return exceptions; }
/** * Move code-related attributes from one method to another. */ private static void transferCodeAttributes(BCMethod from, BCMethod to) { Code code = from.getCode(false); if (code != null) { to.addAttribute(code); from.removeCode(); } Exceptions exceps = from.getExceptions(false); if (exceps != null) to.addAttribute(exceps); }
/** * Move code-related attributes from one method to another. */ private static void transferCodeAttributes(BCMethod from, BCMethod to) { Code code = from.getCode(false); if (code != null) { to.addAttribute(code); from.removeCode(); } Exceptions exceps = from.getExceptions(false); if (exceps != null) to.addAttribute(exceps); }
/** * Move code-related attributes from one method to another. */ private static void transferCodeAttributes(BCMethod from, BCMethod to) { Code code = from.getCode(false); if (code != null) { to.addAttribute(code); from.removeCode(); } Exceptions exceps = from.getExceptions(false); if (exceps != null) to.addAttribute(exceps); }
/** * Move code-related attributes from one method to another. */ private static void transferCodeAttributes(BCMethod from, BCMethod to) { Code code = from.getCode(false); if (code != null) { to.addAttribute(code); from.removeCode(); } Exceptions exceps = from.getExceptions(false); if (exceps != null) to.addAttribute(exceps); }
/** * Move code-related attributes from one method to another. */ private static void transferCodeAttributes(BCMethod from, BCMethod to) { Code code = from.getCode(false); if (code != null) { to.addAttribute(code); from.removeCode(); } Exceptions exceps = from.getExceptions(false); if (exceps != null) to.addAttribute(exceps); }
/** * Return the code for the method. If the code already exists, its * iterator will be reset to the first instruction. * Acts internally through the {@link Attributes} interface. * * @param add if true, a new code attribute will be added * if not already present * @return the code for the metohd, or null if none and the * <code>add</code> param is set to false */ public Code getCode(boolean add) { Code code = (Code) getAttribute(Constants.ATTR_CODE); if (code != null) { code.beforeFirst(); return code; } if (!add) return null; return (Code) addAttribute(Constants.ATTR_CODE); }
/** * Return the code for the method. If the code already exists, its * iterator will be reset to the first instruction. * Acts internally through the {@link Attributes} interface. * * @param add if true, a new code attribute will be added * if not already present * @return the code for the metohd, or null if none and the * <code>add</code> param is set to false */ public Code getCode(boolean add) { Code code = (Code) getAttribute(Constants.ATTR_CODE); if (code != null) { code.beforeFirst(); return code; } if (!add) return null; return (Code) addAttribute(Constants.ATTR_CODE); }