下面列出了org.springframework.core.type.MethodMetadata#isAnnotated ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
public boolean hasAnnotatedMethods(String annotationName) {
for (MethodMetadata methodMetadata : this.methodMetadataSet) {
if (methodMetadata.isAnnotated(annotationName)) {
return true;
}
}
return false;
}
@Override
public Set<MethodMetadata> getAnnotatedMethods(String annotationName) {
Set<MethodMetadata> annotatedMethods = new LinkedHashSet<>(4);
for (MethodMetadata methodMetadata : this.methodMetadataSet) {
if (methodMetadata.isAnnotated(annotationName)) {
annotatedMethods.add(methodMetadata);
}
}
return annotatedMethods;
}
@Override
public boolean hasAnnotatedMethods(String annotationName) {
for (MethodMetadata methodMetadata : this.methodMetadataSet) {
if (methodMetadata.isAnnotated(annotationName)) {
return true;
}
}
return false;
}
@Override
public Set<MethodMetadata> getAnnotatedMethods(String annotationName) {
Set<MethodMetadata> annotatedMethods = new LinkedHashSet<>(4);
for (MethodMetadata methodMetadata : this.methodMetadataSet) {
if (methodMetadata.isAnnotated(annotationName)) {
annotatedMethods.add(methodMetadata);
}
}
return annotatedMethods;
}
public boolean hasAnnotatedMethods(String annotationType) {
for (MethodMetadata method : this.methodMetadataSet) {
if (method.isAnnotated(annotationType)) {
return true;
}
}
return false;
}
public Set<MethodMetadata> getAnnotatedMethods(String annotationType) {
Set<MethodMetadata> annotatedMethods = new LinkedHashSet<MethodMetadata>();
for (MethodMetadata method : this.methodMetadataSet) {
if (method.isAnnotated(annotationType)) {
annotatedMethods.add(method);
}
}
return annotatedMethods;
}
@Override
public boolean hasAnnotatedMethods(String annotationName) {
for (MethodMetadata methodMetadata : this.methodMetadataSet) {
if (methodMetadata.isAnnotated(annotationName)) {
return true;
}
}
return false;
}
@Override
public Set<MethodMetadata> getAnnotatedMethods(String annotationName) {
Set<MethodMetadata> annotatedMethods = new LinkedHashSet<MethodMetadata>(4);
for (MethodMetadata methodMetadata : this.methodMetadataSet) {
if (methodMetadata.isAnnotated(annotationName)) {
annotatedMethods.add(methodMetadata);
}
}
return annotatedMethods;
}
@Override
public boolean hasAnnotatedMethods(String annotationName) {
for (MethodMetadata methodMetadata : this.methodMetadataSet) {
if (methodMetadata.isAnnotated(annotationName)) {
return true;
}
}
return false;
}
@Override
public Set<MethodMetadata> getAnnotatedMethods(String annotationName) {
Set<MethodMetadata> annotatedMethods = new LinkedHashSet<MethodMetadata>(4);
for (MethodMetadata methodMetadata : this.methodMetadataSet) {
if (methodMetadata.isAnnotated(annotationName)) {
annotatedMethods.add(methodMetadata);
}
}
return annotatedMethods;
}
protected String deduceScopeName(MethodMetadata factoryMethodMetadata) {
if (getAnnotationToScopeMappings() == null) {
return null;
}
for (AnnotationToScopeMapping annotationToScopeMapping : getAnnotationToScopeMappings()) {
if (factoryMethodMetadata.isAnnotated(annotationToScopeMapping.getAnnotation().getName())) {
return annotationToScopeMapping.getScope();
}
}
return null;
}