All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gw.lang.parser.coercers.MethodReferenceCoercer Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
/*
 * Copyright 2014 Guidewire Software, Inc.
 */

package gw.lang.parser.coercers;

import gw.lang.reflect.IType;

public class MethodReferenceCoercer extends BaseCoercer
{
  private static final MethodReferenceCoercer INSTANCE = new MethodReferenceCoercer();

  private MethodReferenceCoercer()
  {
  }

  public Object coerceValue( IType typeToCoerceTo, Object value )
  {
    throw new IllegalStateException( "MethodReference coercion is done at compile-time" );
  }

  public boolean isExplicitCoercion()
  {
    return false;
  }

  public boolean handlesNull()
  {
    return false;
  }

  public int getPriority( IType to, IType from )
  {
    return 1;
  }

  public static MethodReferenceCoercer instance()
  {
    return INSTANCE;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy