InvokableReferenceTypeUsage implements TypeUsage, Invokable { @Override public Optional<Invokable> getMethod(String method, boolean staticContext) { return Optional.empty(); } InvokableReferenceTypeUsage(InternalInvokableDefinition internalInvokableDefinition); @Override TypeUsage replaceTypeVariables(Map<String, T> typeParams); @Override boolean sameType(TypeUsage other); @Override boolean isInvokable(); @Override Invokable asInvokable(); @Override JvmType jvmType(); @Override boolean hasInstanceField(String fieldName, Symbol instance); @Override Symbol getInstanceField(String fieldName, Symbol instance); @Override Optional<Invokable> getMethod(String method, boolean staticContext); @Override boolean canBeAssignedTo(TypeUsage type); @Override boolean isOverloaded(); @Override Optional<InternalInvokableDefinition> internalInvokableDefinitionFor(List<ActualParam> actualParams); @Override String describe(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testGetMethod() { assertFalse(invokableA.getMethod("foo", false).isPresent()); assertFalse(invokableB.getMethod("foo", false).isPresent()); assertFalse(invokableC.getMethod("foo", false).isPresent()); assertFalse(invokableD.getMethod("foo", false).isPresent()); assertFalse(invokableA.getMethod("foo", true).isPresent()); assertFalse(invokableB.getMethod("foo", true).isPresent()); assertFalse(invokableC.getMethod("foo", true).isPresent()); assertFalse(invokableD.getMethod("foo", true).isPresent()); }