@Override public Type getDeclaringType() { return _genericMethodDefinition.getDeclaringType(); }
@Override public Type getDeclaringType() { return _genericMethodDefinition.getDeclaringType(); }
@Override public Type getDeclaringType() { return _genericMethodDefinition.getDeclaringType(); }
private static boolean overrideExists(final MethodInfo method, final ArrayList<? extends MethodInfo> methods) { if (methods == null) { return false; } for (int i = 0, n = methods.size(); i < n; i++) { final MethodInfo otherMethod = methods.get(i); if (otherMethod.getDeclaringType() != method.getDeclaringType() && Helper.overrides(otherMethod, method)) { return true; } } return false; }
private static boolean overrideExists(final MethodInfo method, final ArrayList<? extends MethodInfo> methods) { if (methods == null) { return false; } for (int i = 0, n = methods.size(); i < n; i++) { final MethodInfo otherMethod = methods.get(i); if (otherMethod.getDeclaringType() != method.getDeclaringType() && Helper.overrides(otherMethod, method)) { return true; } } return false; }
public static boolean isValidInvocationTargetType(final MethodInfo method, final Type<?> targetType) { final Type declaringType = method.getDeclaringType(); return areReferenceAssignable(declaringType, targetType) || targetType.isSubTypeOf(declaringType); }
public static boolean isValidInvocationTargetType(final MethodInfo method, final Type<?> targetType) { final Type declaringType = method.getDeclaringType(); return areReferenceAssignable(declaringType, targetType) || targetType.isSubTypeOf(declaringType); }
public final boolean isDefault() { if (isAbstract()) { return false; } final Type declaringType = getDeclaringType(); return declaringType != null && declaringType.isInterface(); }
public final boolean isDefault() { if (isAbstract()) { return false; } final Type declaringType = getDeclaringType(); return declaringType != null && declaringType.isInterface(); }
public MethodInfo findOverriddenMethod() { final Type baseType = getDeclaringType().getBaseType(); if (baseType == null || baseType == Type.NullType) { return null; } return findBaseMethod(baseType); }
public static boolean isValidInvocationTargetType(final MethodInfo method, final Type<?> targetType) { final Type declaringType = method.getDeclaringType(); return areReferenceAssignable(declaringType, targetType) || targetType.isSubTypeOf(declaringType); }
public MethodInfo findOverriddenMethod() { final Type baseType = getDeclaringType().getBaseType(); if (baseType == null || baseType == Type.NullType) { return null; } return findBaseMethod(baseType); }
public MethodInfo findOverriddenMethod() { final Type baseType = getDeclaringType().getBaseType(); MethodInfo baseMethod; if (baseType != null && baseType != Type.NullType && (baseMethod = findBaseMethod(baseType)) != null) { return baseMethod; } for (final Type<?> ifType : getDeclaringType().getExplicitInterfaces()) { if ((baseMethod = findBaseMethod(ifType)) != null) { return baseMethod; } } return null; }
public final boolean isDefault() { if (isAbstract() || isStatic()) { return false; } final Type declaringType = getDeclaringType(); return declaringType != null && declaringType.isInterface(); }
DelegatingMethodInfo(final MethodInfo method, final Type<?> reflectedType) { _methodInfo = unwrap(VerifyArgument.notNull(method, "method")); _declaringType = _methodInfo.getDeclaringType(); _reflectedType = VerifyArgument.notNull(reflectedType, "reflectedType"); }
static MethodInfo declaredOn(final MethodInfo method, final Type<?> declaringType, final Type<?> reflectedType) { if (TypeUtils.areEquivalent(declaringType, method.getDeclaringType()) && TypeUtils.areEquivalent(reflectedType, method.getReflectedType())) { return method; } return new DelegatingMethodInfo(method, declaringType, reflectedType); } }
public InterfaceMethodReference getInterfaceMethodReference(final MethodInfo method) { final TypeInfo typeInfo = getTypeInfo(method.getDeclaringType()); final NameAndTypeDescriptor nameAndDescriptor = getNameAndTypeDescriptor( method.getName(), method.getErasedSignature() ); _lookupKey.set(Tag.InterfaceMethodReference, typeInfo.index, nameAndDescriptor.index); Entry entry = _entryMap.get(_lookupKey); if (entry == null) { entry = new InterfaceMethodReference(this, typeInfo.index, nameAndDescriptor.index); } _lookupKey.clear(); return (InterfaceMethodReference)entry; }
public InterfaceMethodReference getInterfaceMethodReference(final MethodInfo method) { final TypeInfo typeInfo = getTypeInfo(method.getDeclaringType()); final NameAndTypeDescriptor nameAndDescriptor = getNameAndTypeDescriptor( method.getName(), method.getErasedSignature() ); _lookupKey.set(Tag.InterfaceMethodReference, typeInfo.index, nameAndDescriptor.index); Entry entry = _entryMap.get(_lookupKey); if (entry == null) { entry = new InterfaceMethodReference(this, typeInfo.index, nameAndDescriptor.index); } _lookupKey.clear(); return (InterfaceMethodReference)entry; }
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); } }