injInfo.getPostConstructMethodName() + " could not be found in class " + injInfo.getClassName());
private Method getPreDestroyMethod(InjectionInfo injInfo, Class resourceClass) throws InjectionException { Method m = injInfo.getPreDestroyMethod(); if( m == null ) { String preDestroyMethodName = injInfo.getPreDestroyMethodName(); // Check for the method within the resourceClass only. // This does not include super-classses. for(Method next : resourceClass.getDeclaredMethods()) { // InjectionManager only handles injection into PreDestroy // methods with no arguments. if( next.getName().equals(preDestroyMethodName) && (next.getParameterTypes().length == 0) ) { m = next; injInfo.setPreDestroyMethod(m); break; } } } if( m == null ) { throw new InjectionException(localStrings.getLocalString( "injection-manager.predestroy-not-found", "InjectionManager exception. PreDestroy method: {0} not found in class: {1}", injInfo.getPreDestroyMethodName(), injInfo.getClassName())); } return m; }
private Method getPreDestroyMethod(InjectionInfo injInfo, Class resourceClass) throws InjectionException { Method m = injInfo.getPreDestroyMethod(); if( m == null ) { String preDestroyMethodName = injInfo.getPreDestroyMethodName(); // Check for the method within the resourceClass only. // This does not include super-classses. for(Method next : resourceClass.getDeclaredMethods()) { // InjectionManager only handles injection into PreDestroy // methods with no arguments. if( next.getName().equals(preDestroyMethodName) && (next.getParameterTypes().length == 0) ) { m = next; injInfo.setPreDestroyMethod(m); break; } } } if( m == null ) { throw new InjectionException(localStrings.getLocalString( "injection-manager.predestroy-not-found", "InjectionManager exception. PreDestroy method: {0} not found in class: {1}", injInfo.getPreDestroyMethodName(), injInfo.getClassName())); } return m; }
injInfo.getPostConstructMethodName() + " could not be found in class " + injInfo.getClassName());
private Method getPostConstructMethod(InjectionInfo injInfo, Class resourceClass) throws InjectionException { Method m = injInfo.getPostConstructMethod(); if( m == null ) { String postConstructMethodName = injInfo.getPostConstructMethodName(); // Check for the method within the resourceClass only. // This does not include super-classes. for(Method next : resourceClass.getDeclaredMethods()) { // InjectionManager only handles injection into PostConstruct // methods with no arguments. if( next.getName().equals(postConstructMethodName) && (next.getParameterTypes().length == 0) ) { m = next; injInfo.setPostConstructMethod(m); break; } } } if( m == null ) { throw new InjectionException(localStrings.getLocalString( "injection-manager.postconstruct-not-found", "InjectionManager exception. PostConstruct method: {0} not found in class: {1}", injInfo.getPostConstructMethodName(), injInfo.getClassName())); } return m; }
private Method getPostConstructMethod(InjectionInfo injInfo, Class resourceClass) throws InjectionException { Method m = injInfo.getPostConstructMethod(); if( m == null ) { String postConstructMethodName = injInfo.getPostConstructMethodName(); // Check for the method within the resourceClass only. // This does not include super-classes. for(Method next : resourceClass.getDeclaredMethods()) { // InjectionManager only handles injection into PostConstruct // methods with no arguments. if( next.getName().equals(postConstructMethodName) && (next.getParameterTypes().length == 0) ) { m = next; injInfo.setPostConstructMethod(m); break; } } } if( m == null ) { throw new InjectionException(localStrings.getLocalString( "injection-manager.postconstruct-not-found", "InjectionManager exception. PostConstruct method: {0} not found in class: {1}", injInfo.getPostConstructMethodName(), injInfo.getClassName())); } return m; }