C# Class SimpleFramework.Xml.Core.AnnotationHandler

The AnnotationHandler object is used to handle all invocation made on a synthetic annotation. This is required so that annotations can be created without an implementation. The java.lang.reflect.Proxy object is used to wrap this invocation handler with the annotation interface.
Inheritance: InvocationHandler
Afficher le fichier Open project: ngallagher/simplexml

Méthodes publiques

Méthode Description
AnnotationHandler ( Class type ) : System

Constructor for the AnnotationHandler object. This is used to create a handler for invocations on a synthetic annotation. The annotation type wrapped must be provided.

Attributes ( System.StringBuilder builder ) : void

This is used to build a string from the annotation. The string produces adheres to the typical string representation of a normal annotation. This ensures that an exceptions that are thrown with a string representation of the annotation are identical to those thrown with a normal annotation.

Equals ( Object proxy, Object list ) : bool

This is used to determine if two annotations are equals based on the attributes of the annotation. The comparison done can ignore specific attributes, for instance the name attribute.

Invoke ( Object proxy, Method method, Object list ) : Object

This is used to handle all invocations on the wrapped annotation. Typically the response to an invocation will result in the default value of the annotation attribute being returned. If the method is an equals or toString then this will be handled by an internal implementation.

Name ( System.StringBuilder builder ) : void

This is used to build a string from the annotation. The string produces adheres to the typical string representation of a normal annotation. This ensures that an exceptions that are thrown with a string representation of the annotation are identical to those thrown with a normal annotation.

ToString ( ) : String

This is used to build a string from the annotation. The string produces adheres to the typical string representation of a normal annotation. This ensures that an exceptions that are thrown with a string representation of the annotation are identical to those thrown with a normal annotation.

Value ( Method method ) : Object

This is used to extract the default value used for the provided annotation attribute. This will return the default value for all attributes except that it makes the requirement optional. Making the requirement optional provides better functionality.

Method Details

AnnotationHandler() public méthode

Constructor for the AnnotationHandler object. This is used to create a handler for invocations on a synthetic annotation. The annotation type wrapped must be provided.
public AnnotationHandler ( Class type ) : System
type Class /// this is the annotation type that this is wrapping ///
Résultat System

Attributes() public méthode

This is used to build a string from the annotation. The string produces adheres to the typical string representation of a normal annotation. This ensures that an exceptions that are thrown with a string representation of the annotation are identical to those thrown with a normal annotation.
public Attributes ( System.StringBuilder builder ) : void
builder System.StringBuilder /// this is the builder used to compose the text ///
Résultat void

Equals() public méthode

This is used to determine if two annotations are equals based on the attributes of the annotation. The comparison done can ignore specific attributes, for instance the name attribute.
public Equals ( Object proxy, Object list ) : bool
proxy Object /// this is the annotation the invocation was made on ///
list Object /// this is the parameters provided to the invocation ///
Résultat bool

Invoke() public méthode

This is used to handle all invocations on the wrapped annotation. Typically the response to an invocation will result in the default value of the annotation attribute being returned. If the method is an equals or toString then this will be handled by an internal implementation.
public Invoke ( Object proxy, Method method, Object list ) : Object
proxy Object /// this is the proxy object the invocation was made on ///
method Method /// this is the method that was invoked on the proxy ///
list Object /// this is the list of parameters to be used ///
Résultat Object

Name() public méthode

This is used to build a string from the annotation. The string produces adheres to the typical string representation of a normal annotation. This ensures that an exceptions that are thrown with a string representation of the annotation are identical to those thrown with a normal annotation.
public Name ( System.StringBuilder builder ) : void
builder System.StringBuilder /// this is the builder used to compose the text ///
Résultat void

ToString() public méthode

This is used to build a string from the annotation. The string produces adheres to the typical string representation of a normal annotation. This ensures that an exceptions that are thrown with a string representation of the annotation are identical to those thrown with a normal annotation.
public ToString ( ) : String
Résultat String

Value() public méthode

This is used to extract the default value used for the provided annotation attribute. This will return the default value for all attributes except that it makes the requirement optional. Making the requirement optional provides better functionality.
public Value ( Method method ) : Object
method Method /// this is the annotation representing the attribute ///
Résultat Object