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

com.google.gwt.emul.java.lang.reflect.ShortField Maven / Gradle / Ivy

The newest version!

package java.lang.reflect;

import com.google.gwt.core.client.JavaScriptObject;

import java.lang.annotation.Annotation;
import java.util.function.Supplier;

/** 
 * A field representing a Short object.
 * 
 * @author "[email protected]"
 *
 */
public class ShortField extends Field{

  public ShortField(Class declaringClass, String name, int modifiers,
      JavaScriptObject accessor, Supplier annos) {
    super(Short.class, declaringClass, name, modifiers, accessor, annos);
  }
  
    public short getShort(Object obj)
  throws IllegalArgumentException, IllegalAccessException
  {
    Object o = get(obj);
    maybeThrowNullGet(o, true);
    return (Short)o;
  }
    
    public void setShort(Object obj, short s)
  throws IllegalArgumentException, IllegalAccessException {
      set(obj, new Short(s));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy