org.xwiki.context
Class ExecutionContext.DeclarationBuilder

java.lang.Object
  extended by org.xwiki.context.ExecutionContext.DeclarationBuilder
Enclosing class:
ExecutionContext

public final class ExecutionContext.DeclarationBuilder
extends Object

Builder class for declaring a new proprety.

Since:
4.3M2

Method Summary
 ExecutionContext.DeclarationBuilder cloneValue()
          Indicate that the value should be cloned when the property is cloned.
 void declare()
          Finish the building by declaring the property in this execution context.
 ExecutionContext.DeclarationBuilder inherited()
          Indicate that the property should be inherited.
 ExecutionContext.DeclarationBuilder initial(Object value)
           
 ExecutionContext.DeclarationBuilder makeFinal()
          Make the initial value the final value.
 ExecutionContext.DeclarationBuilder nonNull()
          Indicate that the property value may not be null.
 ExecutionContext.DeclarationBuilder type(Class<?> type)
          Set the type of the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

declare

public void declare()
Finish the building by declaring the property in this execution context.


initial

public ExecutionContext.DeclarationBuilder initial(Object value)
Parameters:
value - The initial value.
Returns:
this declaration builder.

makeFinal

public ExecutionContext.DeclarationBuilder makeFinal()
Make the initial value the final value.

Returns:
this declaration builder.

cloneValue

public ExecutionContext.DeclarationBuilder cloneValue()
Indicate that the value should be cloned when the property is cloned.

Returns:
this declaration builder.

type

public ExecutionContext.DeclarationBuilder type(Class<?> type)
Set the type of the value.

Parameters:
type - The type to declare for the property.
Returns:
this declaration builder.

inherited

public ExecutionContext.DeclarationBuilder inherited()
Indicate that the property should be inherited.

Returns:
this declaration builder.

nonNull

public ExecutionContext.DeclarationBuilder nonNull()
Indicate that the property value may not be null.

Returns:
this declaration builder.


Copyright © 2004–2015 XWiki. All rights reserved.