Top Description Fields Constructors Methods
net.sf.ehcache.statistics.beans

public abstract Class AttributeProxy<T>

extends Object
Class Inheritance
Known Direct Subclasses
net.sf.ehcache.statistics.beans.BooleanBeanProxy, net.sf.ehcache.statistics.beans.DoubleBeanProxy, net.sf.ehcache.statistics.beans.LongBeanProxy, net.sf.ehcache.statistics.beans.StringBeanProxy
Type Parameters
<T>
the return type/set type for the attribute

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

Field Summary

Modifier and TypeField and Description
private final Class<T>
private final String
private final boolean
private final boolean
private final String

Constructor Summary

AccessConstructor and Description
public
AttributeProxy(Class<T>
the clazz of the return type
clazz
,
String
the name
name
,
String
the description
description
,
boolean
readable
isRead
,
boolean
writable
isWrite
)

Instantiates a new attribute proxy.

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

the value
get
(String
the name
name
)

Gets the value.

public String

Returns:

the description
getDescription
()

Gets the description.

public String

Returns:

the name
getName
()

Gets the name.

public Class<?>

Returns:

the type class
getTypeClass
()

Gets the type class.

public boolean

Returns:

true, if is read
isRead
()

Checks if is readable.

public boolean

Returns:

true, if is writable
isWrite
()

Checks if is writable.

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

Sets the value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clazzback to summary
private final Class<T> clazz
descriptionback to summary
private final String description
isReadback to summary
private final boolean isRead
isWriteback to summary
private final boolean isWrite
nameback to summary
private final String name

Constructor Detail

AttributeProxyback to summary
public AttributeProxy(Class<T> clazz, String name, String description, boolean isRead, boolean isWrite)

Instantiates a new attribute proxy.

Parameters
clazz:Class<T>

the clazz of the return type

name:String

the name

description:String

the description

isRead:boolean

readable

isWrite:boolean

writable

Method Detail

getback to summary
public T get(String name)

Gets the value.

Parameters
name:String

the name

Returns:T

the value

getDescriptionback to summary
public String getDescription()

Gets the description.

Returns:String

the description

getNameback to summary
public String getName()

Gets the name.

Returns:String

the name

getTypeClassback to summary
public Class<?> getTypeClass()

Gets the type class.

Returns:Class<?>

the type class

isReadback to summary
public boolean isRead()

Checks if is readable.

Returns:boolean

true, if is read

isWriteback to summary
public boolean isWrite()

Checks if is writable.

Returns:boolean

true, if is writable

setback to summary
public void set(String name, T t)

Sets the value.

Parameters
name:String

the name

t:T

the value