for (BCMethod method : methods) { if (!method.isPublic()) { continue;
for (BCMethod method : methods) { if (!method.isPublic()) { continue;
for (BCMethod method : methods) { if (!method.isPublic()) { continue;
for (BCMethod method : methods) { if (!method.isPublic()) { continue;
private void addSynchronization(BCClass bc) { BCMethod[] methods = bc.getDeclaredMethods(); for (int i = 0; i < methods.length; i++) { if (methods[i].isPublic() && _synchs.contains(methods[i].getName())) methods[i].setSynchronized(true); } // add synchronized isLoaded call. // public synchronized boolean isLoaded (int field) // { // return super.isLoaded (field); // } BCMethod method = bc.declareMethod("isLoaded", boolean.class, new Class[]{ int.class }); method.setSynchronized(true); Code code = method.getCode(true); code.aload().setThis(); code.iload().setParam(0); code.invokespecial().setMethod(AbstractPCData.class, "isLoaded", boolean.class, new Class[]{ int.class }); code.calculateMaxLocals(); code.calculateMaxStack(); code.ireturn(); }
private void addSynchronization(BCClass bc) { BCMethod[] methods = bc.getDeclaredMethods(); for (int i = 0; i < methods.length; i++) { if (methods[i].isPublic() && _synchs.contains(methods[i].getName())) methods[i].setSynchronized(true); } // add synchronized isLoaded call. // public synchronized boolean isLoaded (int field) // { // return super.isLoaded (field); // } BCMethod method = bc.declareMethod("isLoaded", boolean.class, new Class[]{ int.class }); method.setSynchronized(true); Code code = method.getCode(true); code.aload().setThis(); code.iload().setParam(0); code.invokespecial().setMethod(AbstractPCData.class, "isLoaded", boolean.class, new Class[]{ int.class }); code.calculateMaxLocals(); code.calculateMaxStack(); code.ireturn(); }
private void addSynchronization(BCClass bc) { BCMethod[] methods = bc.getDeclaredMethods(); for (int i = 0; i < methods.length; i++) { if (methods[i].isPublic() && _synchs.contains(methods[i].getName())) methods[i].setSynchronized(true); } // add synchronized isLoaded call. // public synchronized boolean isLoaded (int field) // { // return super.isLoaded (field); // } BCMethod method = bc.declareMethod("isLoaded", boolean.class, new Class[]{ int.class }); method.setSynchronized(true); Code code = method.getCode(true); code.aload().setThis(); code.iload().setParam(0); code.invokespecial().setMethod(AbstractPCData.class, "isLoaded", boolean.class, new Class[]{ int.class }); code.calculateMaxLocals(); code.calculateMaxStack(); code.ireturn(); }
private void addSynchronization(BCClass bc) { BCMethod[] methods = bc.getDeclaredMethods(); for (int i = 0; i < methods.length; i++) { if (methods[i].isPublic() && _synchs.contains(methods[i].getName())) methods[i].setSynchronized(true); } // add synchronized isLoaded call. // public synchronized boolean isLoaded (int field) // { // return super.isLoaded (field); // } BCMethod method = bc.declareMethod("isLoaded", boolean.class, new Class[]{ int.class }); method.setSynchronized(true); Code code = method.getCode(true); code.aload().setThis(); code.iload().setParam(0); code.invokespecial().setMethod(AbstractPCData.class, "isLoaded", boolean.class, new Class[]{ int.class }); code.calculateMaxLocals(); code.calculateMaxStack(); code.ireturn(); }
private void addSynchronization(BCClass bc) { BCMethod[] methods = bc.getDeclaredMethods(); for (int i = 0; i < methods.length; i++) { if (methods[i].isPublic() && _synchs.contains(methods[i].getName())) methods[i].setSynchronized(true); } // add synchronized isLoaded call. // public synchronized boolean isLoaded (int field) // { // return super.isLoaded (field); // } BCMethod method = bc.declareMethod("isLoaded", boolean.class, new Class[]{ int.class }); method.setSynchronized(true); Code code = method.getCode(true); code.aload().setThis(); code.iload().setParam(0); code.invokespecial().setMethod(AbstractPCData.class, "isLoaded", boolean.class, new Class[]{ int.class }); code.calculateMaxLocals(); code.calculateMaxStack(); code.ireturn(); }
if (!meth.isPublic()) { if (_log.isWarnEnabled()) _log.warn(_loc.get("enhance-defcons-extern",
if (!meth.isPublic()) { if (_log.isWarnEnabled()) _log.warn(_loc.get("enhance-defcons-extern",
if (!meth.isPublic()) { if (_log.isWarnEnabled()) _log.warn(_loc.get("enhance-defcons-extern",
if (!meth.isPublic()) { if (_log.isWarnEnabled()) _log.warn(_loc.get("enhance-defcons-extern",
if (!meth.isPublic()) { if (_log.isWarnEnabled()) _log.warn(_loc.get("enhance-defcons-extern",
private boolean setVisibilityToSuperMethod(BCMethod method) { BCMethod[] methods = _managedType.getMethods(method.getName(), method.getParamTypes()); if (methods.length == 0) throw new UserException(_loc.get("no-accessor", _managedType.getName(), method.getName())); BCMethod superMeth = methods[0]; if (superMeth.isPrivate()) { method.makePrivate(); return true; } else if (superMeth.isPackage()) { method.makePackage(); return true; } else if (superMeth.isProtected()) { method.makeProtected(); return true; } else if (superMeth.isPublic()) { method.makePublic(); return true; } return false; }
private boolean setVisibilityToSuperMethod(BCMethod method) { BCMethod[] methods = _managedType.getMethods(method.getName(), method.getParamTypes()); if (methods.length == 0) throw new UserException(_loc.get("no-accessor", _managedType.getName(), method.getName())); BCMethod superMeth = methods[0]; if (superMeth.isPrivate()) { method.makePrivate(); return true; } else if (superMeth.isPackage()) { method.makePackage(); return true; } else if (superMeth.isProtected()) { method.makeProtected(); return true; } else if (superMeth.isPublic()) { method.makePublic(); return true; } return false; }
private boolean setVisibilityToSuperMethod(BCMethod method) { BCMethod[] methods = _managedType.getMethods(method.getName(), method.getParamTypes()); if (methods.length == 0) throw new UserException(_loc.get("no-accessor", _managedType.getName(), method.getName())); BCMethod superMeth = methods[0]; if (superMeth.isPrivate()) { method.makePrivate(); return true; } else if (superMeth.isPackage()) { method.makePackage(); return true; } else if (superMeth.isProtected()) { method.makeProtected(); return true; } else if (superMeth.isPublic()) { method.makePublic(); return true; } return false; }
private boolean setVisibilityToSuperMethod(BCMethod method) { BCMethod[] methods = _managedType.getMethods(method.getName(), method.getParamTypes()); if (methods.length == 0) throw new UserException(_loc.get("no-accessor", _managedType.getName(), method.getName())); BCMethod superMeth = methods[0]; if (superMeth.isPrivate()) { method.makePrivate(); return true; } else if (superMeth.isPackage()) { method.makePackage(); return true; } else if (superMeth.isProtected()) { method.makeProtected(); return true; } else if (superMeth.isPublic()) { method.makePublic(); return true; } return false; }
private boolean setVisibilityToSuperMethod(BCMethod method) { BCMethod[] methods = _managedType.getMethods(method.getName(), method.getParamTypes()); if (methods.length == 0) throw new UserException(_loc.get("no-accessor", _managedType.getName(), method.getName())); BCMethod superMeth = methods[0]; if (superMeth.isPrivate()) { method.makePrivate(); return true; } else if (superMeth.isPackage()) { method.makePackage(); return true; } else if (superMeth.isProtected()) { method.makeProtected(); return true; } else if (superMeth.isPublic()) { method.makePublic(); return true; } return false; }