Class AttributedObjectBase
- java.lang.Object
-
- org.glassfish.pfl.dynamic.codegen.impl.AttributedObjectBase
-
- All Implemented Interfaces:
AttributedObject,CopyInterceptor
- Direct Known Subclasses:
NodeBase
public class AttributedObjectBase extends java.lang.Object implements AttributedObject, CopyInterceptor
An implementation of the AttributedObject interface. This implementation supports lazy copying of AttributedObject instances.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<java.lang.Object>attributesprivate AttributedObjectBasedelegate
-
Constructor Summary
Constructors Constructor Description AttributedObjectBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Object>attributes()Internal method for dynamic attribute support.private voidensure(int index)java.lang.Objectget(int index)Internal method for dynamic attribute support.voidpostCopy()voidpreCopy()voidset(int index, java.lang.Object obj)Internal method for dynamic attribute support.
-
-
-
Field Detail
-
delegate
@Copy(SOURCE) private AttributedObjectBase delegate
-
-
Method Detail
-
preCopy
public void preCopy()
- Specified by:
preCopyin interfaceCopyInterceptor
-
postCopy
public void postCopy()
- Specified by:
postCopyin interfaceCopyInterceptor
-
ensure
private void ensure(int index)
-
get
public final java.lang.Object get(int index)
Description copied from interface:AttributedObjectInternal method for dynamic attribute support. Return the value of the attribute at index. If the attribute at index is not set, set it to the default value and return the default.- Specified by:
getin interfaceAttributedObject
-
set
public final void set(int index, java.lang.Object obj)Description copied from interface:AttributedObjectInternal method for dynamic attribute support. Set the attribute at index to obj.- Specified by:
setin interfaceAttributedObject
-
attributes
public final java.util.List<java.lang.Object> attributes()
Description copied from interface:AttributedObjectInternal method for dynamic attribute support. Return all attributes for this node (may be null).- Specified by:
attributesin interfaceAttributedObject
-
-