Package net.sf.ehcache.statistics.beans
Class AttributeProxy<T>
- java.lang.Object
-
- 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 java.lang.ObjectThe Class AttributeProxy, used to proxy operations from a dynamic mbean to a POJO object. Override get()/set() as needed.- Author:
- cschanck
-
-
Constructor Summary
Constructors Constructor Description AttributeProxy(java.lang.Class<T> clazz, java.lang.String name, java.lang.String description, boolean isRead, boolean isWrite)Instantiates a new attribute proxy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget(java.lang.String name)Gets the value.java.lang.StringgetDescription()Gets the description.java.lang.StringgetName()Gets the name.java.lang.Class<?>getTypeClass()Gets the type class.booleanisRead()Checks if is readable.booleanisWrite()Checks if is writable.voidset(java.lang.String name, T t)Sets the value.
-
-
-
Constructor Detail
-
AttributeProxy
public AttributeProxy(java.lang.Class<T> clazz, java.lang.String name, java.lang.String description, boolean isRead, boolean isWrite)
Instantiates a new attribute proxy.- Parameters:
clazz- the clazz of the return typename- the namedescription- the descriptionisRead- readableisWrite- writable
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Gets the description.- Returns:
- the description
-
getTypeClass
public java.lang.Class<?> getTypeClass()
Gets the type class.- Returns:
- the type class
-
getName
public java.lang.String getName()
Gets the name.- Returns:
- the name
-
get
public T get(java.lang.String name)
Gets the value.- Parameters:
name- the name- Returns:
- the value
-
set
public void set(java.lang.String name, T t)Sets the value.- Parameters:
name- the namet- 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
-
-