类 Ejb3TransactionAnnotationParser
- java.lang.Object
- org.springframework.transaction.annotation.Ejb3TransactionAnnotationParser
- 所有已实现的接口:
Serializable,TransactionAnnotationParser
public class Ejb3TransactionAnnotationParser extends Object implements TransactionAnnotationParser, Serializable
Strategy implementation for parsing EJB3'sTransactionAttributeannotation.- 从以下版本开始:
- 2.5
- 作者:
- Juergen Hoeller
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 Ejb3TransactionAnnotationParser()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(Object other)inthashCode()booleanisCandidateClass(Class<?> targetClass)Determine whether the given class is a candidate for transaction attributes in the annotation format of thisTransactionAnnotationParser.TransactionAttributeparseTransactionAnnotation(AnnotatedElement element)Parse the transaction attribute for the given method or class, based on an annotation type understood by this parser.TransactionAttributeparseTransactionAnnotation(TransactionAttribute ann)
构造器详细资料
Ejb3TransactionAnnotationParser
public Ejb3TransactionAnnotationParser()
方法详细资料
isCandidateClass
public boolean isCandidateClass(Class<?> targetClass)
从接口复制的说明:TransactionAnnotationParserDetermine whether the given class is a candidate for transaction attributes in the annotation format of thisTransactionAnnotationParser.If this method returns
false, the methods on the given class will not get traversed for#parseTransactionAnnotationintrospection. Returningfalseis therefore an optimization for non-affected classes, whereastruesimply means that the class needs to get fully introspected for each method on the given class individually.- 指定者:
isCandidateClass在接口中TransactionAnnotationParser- 参数:
targetClass- the class to introspect- 返回:
falseif the class is known to have no transaction annotations at class or method level;trueotherwise. The default implementation returnstrue, leading to regular introspection.
parseTransactionAnnotation
@Nullable public TransactionAttribute parseTransactionAnnotation(AnnotatedElement element)
从接口复制的说明:TransactionAnnotationParserParse the transaction attribute for the given method or class, based on an annotation type understood by this parser.This essentially parses a known transaction annotation into Spring's metadata attribute class. Returns
nullif the method/class is not transactional.- 指定者:
parseTransactionAnnotation在接口中TransactionAnnotationParser- 参数:
element- the annotated method or class- 返回:
- the configured transaction attribute, or
nullif none found - 另请参阅:
AnnotationTransactionAttributeSource.determineTransactionAttribute(java.lang.reflect.AnnotatedElement)
parseTransactionAnnotation
public TransactionAttribute parseTransactionAnnotation(TransactionAttribute ann)