Interface PropertyHandler<Type>
- Type Parameters:
- Type- The type of object this property can be applied to.
- All Known Subinterfaces:
- PropertyHandler.ConditionPropertyHandler<Type>,- PropertyHandler.ContainsHandler<Container,,- Element> - PropertyHandler.ExpressionPropertyHandler<Type,,- ReturnType> - PropertyHandler.TypedValuePropertyHandler<Type,- ValueType> 
- All Known Implementing Classes:
- PlayerClassInfo.PlayerDisplayNameHandler
@Experimental
public interface PropertyHandler<Type>
A handler for a specific property. Any method of resolving or changing the property should be done here.
 A handler can be nearly anything and do nearly anything. Some examples are provided in the sub-interfaces.
 
If a handler needs to store state, it should override
If a handler needs to store state, it should override
newInstance() to return a new instance of itself.
 Each new instance will be initialized with init(Expression, ParserInstance) before use, so state can be
 set up there if it depends on the parser instance or parent expression.- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA handler for a simple property condition.static interfaceA handler that can check if a container contains a specific element.static interfaceA handler that can get and optionally change a property value.static interface
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleaninit(Expression<?> parentExpression, ParserInstance parser) Initializes this handler with the given parser instance.default PropertyHandler<Type> Creates a new instance of this handler.
- 
Method Details- 
newInstanceCreates a new instance of this handler. If a handler does not need to store state, it can simply returnthis. If a handler needs to store state, it **MUST** return a new instance of itself. Seefor an example of a stateful handler.invalid referenceScriptClassInfo.ScriptNameHandler- Returns:
- A new instance of this handler, or thisif no state is stored.
 
- 
initInitializes this handler with the given parser instance. This method is called once afternewInstance(). If the handler does not need any initialization, it can simply returntrue.
 It is safe to print warnings or errors from this method.- Parameters:
- parentExpression- The expression that is using this handler. Can be used to get context about the property usage.
- parser- The parser instance that will use this handler.
- Returns:
- trueif the handler was initialized successfully,- falseotherwise.
 
 
-