public final boolean isDefault() { if (isAbstract() || isStatic()) { return false; } final Type declaringType = getDeclaringType(); return declaringType != null && declaringType.isInterface(); }
public void call(final MethodInfo method) { VerifyArgument.notNull(method, "method"); final OpCode opCode; if (method.isStatic()) { emit(OpCode.INVOKESTATIC, method); } else if (method.getDeclaringType().isInterface()) { emit(OpCode.INVOKEINTERFACE, method); } else { emit(OpCode.INVOKEVIRTUAL, method); } }
public void call(final MethodInfo method) { VerifyArgument.notNull(method, "method"); final OpCode opCode; if (method.isStatic()) { emit(OpCode.INVOKESTATIC, method); } else if (method.getDeclaringType().isInterface()) { emit(OpCode.INVOKEINTERFACE, method); } else { emit(OpCode.INVOKEVIRTUAL, method); } }
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()]) ); }