public void call(final MethodInfo method) { VerifyArgument.notNull(method, "method"); final OpCode opCode; if (method.isStatic()) { emit(OpCode.INVOKESTATIC, method); } else if (method.isPrivate()) { emit(OpCode.INVOKESPECIAL, method); } else if (method.getDeclaringType().isInterface()) { emit(OpCode.INVOKEINTERFACE, method); } else { emit(OpCode.INVOKEVIRTUAL, method); } }
public MethodInfo findBaseMethod(final Type<?> relativeTo) { VerifyArgument.notNull(relativeTo, "relativeTo"); final Type<?> declaringType = getDeclaringType(); if (!relativeTo.isAssignableFrom(declaringType)) { throw Error.invalidAncestorType(relativeTo, declaringType); } if (isStatic() || isPrivate()) { return null; } final ParameterList parameters = getParameters(); return relativeTo.getMethod( getName(), BindingFlags.AllInstance, getCallingConvention(), parameters.getParameterTypes().toArray(new Type[parameters.size()]) ); }
public MethodInfo findBaseMethod(final Type<?> relativeTo) { VerifyArgument.notNull(relativeTo, "relativeTo"); final Type<?> declaringType = getDeclaringType(); if (!relativeTo.isAssignableFrom(declaringType)) { throw Error.invalidAncestorType(relativeTo, declaringType); } if (isStatic() || isPrivate() || declaringType.isInterface()) { return null; } final ParameterList parameters = getParameters(); return relativeTo.getMethod( getName(), BindingFlags.AllInstance, getCallingConvention(), parameters.getParameterTypes().toArray(new Type[parameters.size()]) ); }
public MethodInfo findBaseMethod(final Type<?> relativeTo) { VerifyArgument.notNull(relativeTo, "relativeTo"); final Type<?> declaringType = getDeclaringType(); if (!relativeTo.isAssignableFrom(declaringType)) { throw Error.invalidAncestorType(relativeTo, declaringType); } if (isStatic() || isPrivate() || declaringType.isInterface()) { return null; } final ParameterList parameters = getParameters(); return relativeTo.getMethod( getName(), BindingFlags.AllInstance, getCallingConvention(), parameters.getParameterTypes().toArray(new Type[parameters.size()]) ); }
public static boolean overrides(final MethodInfo baseMethod, final MethodInfo ancestorMethod) { if (ancestorMethod.isFinal() || ancestorMethod.isPrivate()) { return false;
public static boolean overrides(final MethodInfo baseMethod, final MethodInfo ancestorMethod) { if (ancestorMethod.isFinal() || ancestorMethod.isPrivate()) { return false;
public static boolean overrides(final MethodInfo baseMethod, final MethodInfo ancestorMethod) { if (ancestorMethod.isFinal() || ancestorMethod.isPrivate()) { return false;