Examples of findMethod()


Examples of edu.umd.cs.findbugs.ba.XClass.findMethod()

            // 2 look in the hierarchy if we have relaxed contract
            HierarchyIterator hierarchy = new HierarchyIterator(xclass);
            XClass superClass;
            boolean done = false;
            while (!done && (superClass = hierarchy.next()) != null) {
                XMethod method = superClass.findMethod(name, desc, false);
                if (method != null) {
                    done = checkMethod(method);
                } else {
                    for (XMethod superMethod : superClass.getXMethods()) {
                        if (name.equals(superMethod.getName()) && compatibleParameters(desc, superMethod.getSignature())) {
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.XClass.findMethod()

                        boolean nasty = false;
                        for (ClassDescriptor subclass : subtypes) {
                            if (!subclass.equals(getClassDescriptor())) {

                                XClass xSub = AnalysisContext.currentXFactory().getXClass(subclass);
                                if (xSub != null && xSub.findMethod("readResolve", "()Ljava/lang/Object;", false) == null
                                        && xSub.findMethod("writeReplace", "()Ljava/lang/Object;", false) == null) {
                                    bug.addClass(subclass).describe(ClassAnnotation.SUBCLASS_ROLE);
                                    nasty = true;
                                }
                            }
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.XClass.findMethod()

                        for (ClassDescriptor subclass : subtypes) {
                            if (!subclass.equals(getClassDescriptor())) {

                                XClass xSub = AnalysisContext.currentXFactory().getXClass(subclass);
                                if (xSub != null && xSub.findMethod("readResolve", "()Ljava/lang/Object;", false) == null
                                        && xSub.findMethod("writeReplace", "()Ljava/lang/Object;", false) == null) {
                                    bug.addClass(subclass).describe(ClassAnnotation.SUBCLASS_ROLE);
                                    nasty = true;
                                }
                            }
                        }
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.analysis.ClassInfo.findMethod()

            }
            // AnalysisContext.logError("Error adding built-in nullness annotation",
            // e);
            return null;
        }
        XMethod xmethod = xclass.findMethod(mName, sig, isStatic);

        if (xmethod == null) {
            xmethod = XFactory.createXMethod(cName, mName, sig, isStatic);
        }
        return xmethod;
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeResolvable.findMethod()

    }
   
    if (bm == null) {
      IBytecodeResolvable st = this.superType;
      if (st == null) st = pool.resolve(Object.class.getName());
      return st.findMethod(pool, name, parameters);
    }
   
    return bm;
  }
 
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeResolvable.findMethod()

   */
  public MethodInvocation createSuperInvocation (String name, IBytecodeReferenceable... parameters) {
    IBytecodeResolvable st = this.getEnclosingType().getSuperType();
    if (st == null) st = this.getResolutionPool().resolve(Object.class.getName());
   
    IBytecodeMethod method = st.findMethod(this.getResolutionPool(), name, getTypes(parameters));
   
    if (method == null)
      throw new BytecodeException("No such method could be found: " + name + " for " + st.getType().toDescriptorString());
   
    return this.createInvocation(resolve("this"), method, parameters);
View Full Code Here

Examples of org.apache.velocity.util.introspection.ClassMap.findMethod()

      throws Exception
    {
  Log log = Velocity.getLog();
 
        ClassMap c = new ClassMap(TestClassMap.class, log);
        assertNotNull(c.findMethod("setBoolean",   new Object[] { Boolean.TRUE }));
        assertNotNull(c.findMethod("setByte",      new Object[] { new Byte((byte) 4)}));
        assertNotNull(c.findMethod("setCharacter", new Object[] { new Character('c')}));
        assertNotNull(c.findMethod("setDouble",    new Object[] { new Double(8.0) }));
        assertNotNull(c.findMethod("setFloat",     new Object[] { new Float(15.0) }));
        assertNotNull(c.findMethod("setInteger",   new Object[] { new Integer(16) }));
View Full Code Here

Examples of org.apache.velocity.util.introspection.ClassMap.findMethod()

    {
  Log log = Velocity.getLog();
 
        ClassMap c = new ClassMap(TestClassMap.class, log);
        assertNotNull(c.findMethod("setBoolean",   new Object[] { Boolean.TRUE }));
        assertNotNull(c.findMethod("setByte",      new Object[] { new Byte((byte) 4)}));
        assertNotNull(c.findMethod("setCharacter", new Object[] { new Character('c')}));
        assertNotNull(c.findMethod("setDouble",    new Object[] { new Double(8.0) }));
        assertNotNull(c.findMethod("setFloat",     new Object[] { new Float(15.0) }));
        assertNotNull(c.findMethod("setInteger",   new Object[] { new Integer(16) }));
        assertNotNull(c.findMethod("setLong",      new Object[] { new Long(23) }));
View Full Code Here

Examples of org.apache.velocity.util.introspection.ClassMap.findMethod()

  Log log = Velocity.getLog();
 
        ClassMap c = new ClassMap(TestClassMap.class, log);
        assertNotNull(c.findMethod("setBoolean",   new Object[] { Boolean.TRUE }));
        assertNotNull(c.findMethod("setByte",      new Object[] { new Byte((byte) 4)}));
        assertNotNull(c.findMethod("setCharacter", new Object[] { new Character('c')}));
        assertNotNull(c.findMethod("setDouble",    new Object[] { new Double(8.0) }));
        assertNotNull(c.findMethod("setFloat",     new Object[] { new Float(15.0) }));
        assertNotNull(c.findMethod("setInteger",   new Object[] { new Integer(16) }));
        assertNotNull(c.findMethod("setLong",      new Object[] { new Long(23) }));
        assertNotNull(c.findMethod("setShort",     new Object[] { new Short((short)42)}));
View Full Code Here

Examples of org.apache.velocity.util.introspection.ClassMap.findMethod()

 
        ClassMap c = new ClassMap(TestClassMap.class, log);
        assertNotNull(c.findMethod("setBoolean",   new Object[] { Boolean.TRUE }));
        assertNotNull(c.findMethod("setByte",      new Object[] { new Byte((byte) 4)}));
        assertNotNull(c.findMethod("setCharacter", new Object[] { new Character('c')}));
        assertNotNull(c.findMethod("setDouble",    new Object[] { new Double(8.0) }));
        assertNotNull(c.findMethod("setFloat",     new Object[] { new Float(15.0) }));
        assertNotNull(c.findMethod("setInteger",   new Object[] { new Integer(16) }));
        assertNotNull(c.findMethod("setLong",      new Object[] { new Long(23) }));
        assertNotNull(c.findMethod("setShort",     new Object[] { new Short((short)42)}));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.