ehcache

net.sf.ehcache.statistics.beans
Class AttributeProxy<T>

java.lang.Object
  extended by net.sf.ehcache.statistics.beans.AttributeProxy<T>
Type Parameters:
T - the return type/set type for the attribute
Direct Known Subclasses:
BooleanBeanProxy, DoubleBeanProxy, LongBeanProxy, StringBeanProxy

public abstract class AttributeProxy<T>
extends Object

The Class AttributeProxy, used to proxy operations from a dynamic mbean to a POJO object. Override get()/set() as needed.

Author:
cschanck

Constructor Summary
AttributeProxy(Class<T> clazz, String name, String description, boolean isRead, boolean isWrite)
          Instantiates a new attribute proxy.
 
Method Summary
 T get(String name)
          Gets the value.
 String getDescription()
          Gets the description.
 String getName()
          Gets the name.
 Class<?> getTypeClass()
          Gets the type class.
 boolean isRead()
          Checks if is readable.
 boolean isWrite()
          Checks if is writable.
 void set(String name, T t)
          Sets the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeProxy

public AttributeProxy(Class<T> clazz,
                      String name,
                      String description,
                      boolean isRead,
                      boolean isWrite)
Instantiates a new attribute proxy.

Parameters:
clazz - the clazz of the return type
name - the name
description - the description
isRead - readable
isWrite - writable
Method Detail

getDescription

public String getDescription()
Gets the description.

Returns:
the description

getTypeClass

public Class<?> getTypeClass()
Gets the type class.

Returns:
the type class

getName

public String getName()
Gets the name.

Returns:
the name

get

public T get(String name)
Gets the value.

Parameters:
name - the name
Returns:
the value

set

public void set(String name,
                T t)
Sets the value.

Parameters:
name - the name
t - the value

isRead

public boolean isRead()
Checks if is readable.

Returns:
true, if is read

isWrite

public boolean isWrite()
Checks if is writable.

Returns:
true, if is writable

ehcache

Copyright 2001-2015, Terracotta, Inc.