/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getConstructor(JType[] argTypes) { for (JMethod m : constructors) { if (m.hasSignature(argTypes)) return m; } return null; }
/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getConstructor(JType[] argTypes) { for (JMethod m : constructors) { if (m.hasSignature(argTypes)) return m; } return null; }
/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getConstructor(JType[] argTypes) { for (JMethod m : constructors) { if (m.hasSignature(argTypes)) return m; } return null; }
/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getConstructor(JType[] argTypes) { for (JMethod m : constructors) { if (m.hasSignature(argTypes)) return m; } return null; }
/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getConstructor(JType[] argTypes) { for (JMethod m : constructors) { if (m.hasSignature(argTypes)) return m; } return null; }
private void removeConstructors(ClassOutline classOutline) { JDefinedClass impl = classOutline.implClass; Iterator<JMethod> constructors = impl.constructors(); while (constructors.hasNext()) { JMethod constructor = constructors.next(); if (constructor.hasSignature(new JType[]{impl}) /* || constructor.hasSignature(new JType[]{}) */) { // default constructor has to be kept there! constructors.remove(); } } }
private void removeCloneableMethod(ClassOutline classOutline) { JDefinedClass impl = classOutline.implClass; Iterator<JMethod> methods = impl.methods().iterator(); while (methods.hasNext()) { JMethod method = methods.next(); if ("clone".equals(method.name()) && method.hasSignature(new JType[]{})) { methods.remove(); } } }
/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getMethod(String name, JType[] argTypes) { for (JMethod m : methods) { if (!m.name().equals(name)) continue; if (m.hasSignature(argTypes)) return m; } return null; }
/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getMethod(String name, JType[] argTypes) { for (JMethod m : methods) { if (!m.name().equals(name)) continue; if (m.hasSignature(argTypes)) return m; } return null; }
/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getMethod(String name, JType[] argTypes) { for (JMethod m : methods) { if (!m.name().equals(name)) continue; if (m.hasSignature(argTypes)) return m; } return null; }
/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getMethod(String name, JType[] argTypes) { for (JMethod m : methods) { if (!m.name().equals(name)) continue; if (m.hasSignature(argTypes)) return m; } return null; }
/** * Looks for a method that has the specified method signature * and return it. * * @return * null if not found. */ public JMethod getMethod(String name, JType[] argTypes) { for (JMethod m : methods) { if (!m.name().equals(name)) continue; if (m.hasSignature(argTypes)) return m; } return null; }
if ( m.name().equals( methodName ) && m.hasSignature( signature ) )
if ( m.name().equals( methodName ) && m.hasSignature( signature ) ) if ( m.name().equals( methodName ) && m.hasSignature( signature ) )
if ( m.name().equals( methodName ) && m.hasSignature( signature ) ) if ( m.name().equals( methodName ) && m.hasSignature( signature ) )
if ( m.name().equals( methodName ) && m.hasSignature( signature ) ) if ( m.name().equals( methodName ) && m.hasSignature( signature ) )
if ( m.name().equals( methodName ) && m.hasSignature( signature ) ) if ( m.name().equals( methodName ) && m.hasSignature( signature ) )
if ( m.name().equals( methodName ) && m.hasSignature( signature ) ) if ( m.name().equals( methodName ) && m.hasSignature( signature ) )
if ( m.name().equals( methodName ) && m.hasSignature( signature ) ) if ( m.name().equals( methodName ) && m.hasSignature( signature ) )
if ( m.name().equals( methodName ) && m.hasSignature( signature ) ) if ( m.name().equals( methodName ) && m.hasSignature( signature ) )