docs: public static int getLineNumber(Member member) {
  
          if (!(member instanceof Method || member instanceof Constructor)) {
              // We are not able to get this info for fields
              return 0;
          }
  
          // BCEL is an optional dependency, if we cannot load it, simply return 0
          if (!Reflections.isClassLoadable(BCEL_CLASS, WeldClassLoaderResourceLoader.INSTANCE)) {
              return 0;
          }
  
          String classFile = member.getDeclaringClass().getName().replace('.', '/');
          ClassLoaderResourceLoader classFileResourceLoader = new ClassLoaderResourceLoader(member.getDeclaringClass().getClassLoader());
          InputStream in = null;
  
          try {
              URL classFileUrl = classFileResourceLoader.getResource(classFile + ".class");
  
              if (classFileUrl == null) {
                  // The class file is not available
                  return 0;
              }
              in = classFileUrl.openStream();
  
              ClassParser cp = new ClassParser(in, classFile);
              JavaClass javaClass = cp.parse();
  
              // First get all declared methods and constructors
              // Note that in bytecode constructor is translated into a method
              org.apache.bcel.classfile.Method[] methods = javaClass.getMethods();
              org.apache.bcel.classfile.Method match = null;
  
              String signature;
              String name;
              if (member instanceof Method) {
                  signature = DescriptorUtils.methodDescriptor((Method) member);
                  name = member.getName();
              } else if (member instanceof Constructor) {
                  signature = DescriptorUtils.makeDescriptor((Constructor<?>) member);
                  name = INIT_METHOD_NAME;
              } else {
                  return 0;
              }
  
              for (org.apache.bcel.classfile.Method method : methods) {
                  // Matching method must have the same name, modifiers and signature
                  if (method.getName().equals(name)
                          && member.getModifiers() == method.getModifiers()
                          && method.getSignature().equals(signature)) {
                      match = method;
                  }
              }
              if (match != null) {
                  // If a method is found, try to obtain the optional LineNumberTable attribute
                  LineNumberTable lineNumberTable = match.getLineNumberTable();
                  if (lineNumberTable != null) {
                      int line = lineNumberTable.getSourceLine(0);
                      return line == -1 ? 0 : line;
                  }
              }
              // No suitable method found
              return 0;
  
          } catch (Throwable t) {
              return 0;
          } finally {
              if (in != null) {
                  try {
                      in.close();
                  } catch (Exception e) {
                      return 0;
                  }
              }
          }
      }