Tabnine Logo
MemberHoldingTypeDetails.getAnnotations
Code IndexAdd Tabnine to your IDE (free)

How to use
getAnnotations
method
in
org.springframework.roo.classpath.details.MemberHoldingTypeDetails

Best Java code snippets using org.springframework.roo.classpath.details.MemberHoldingTypeDetails.getAnnotations (Showing top 12 results out of 315)

origin: spring-projects/spring-roo

 public List<MemberHoldingTypeDetails> matches(
   final List<MemberHoldingTypeDetails> memberHoldingTypeDetailsList) {
  final Map<String, MemberHoldingTypeDetails> matched =
    new HashMap<String, MemberHoldingTypeDetails>();
  for (final MemberHoldingTypeDetails memberHoldingTypeDetails : memberHoldingTypeDetailsList) {
   for (final AnnotationMetadata annotationMetadata : memberHoldingTypeDetails.getAnnotations()) {
    for (final JavaType annotationTypeToMatchOn : annotationTypesToMatchOn) {
     if (annotationMetadata.getAnnotationType().equals(annotationTypeToMatchOn)) {
      matched.put(memberHoldingTypeDetails.getDeclaredByMetadataId(),
        memberHoldingTypeDetails);
     }
    }
   }
  }
  return new ArrayList<MemberHoldingTypeDetails>(matched.values());
 }
}
origin: spring-projects/spring-roo

 public boolean isRequestingAnnotatedWith(final AnnotationMetadata annotationMetadata,
   final String requestingMid) {
  for (final MemberHoldingTypeDetails memberHoldingTypeDetails : details) {
   if (MemberFindingUtils.getAnnotationOfType(memberHoldingTypeDetails.getAnnotations(),
     annotationMetadata.getAnnotationType()) != null) {
    if (memberHoldingTypeDetails.getDeclaredByMetadataId().equals(requestingMid)) {
     return true;
    }
   }
  }
  return false;
 }
}
origin: spring-projects/spring-roo

/**
 * Returns the metadata for the annotation of the given type from within the
 * given metadata
 * 
 * @param metadata the metadata to search; can be <code>null</code>
 * @param annotationType the type of annotation for which to return the
 *            metadata; can be <code>null</code>
 * @return <code>null</code> if not found
 * @since 1.2.0
 */
public static AnnotationMetadata getAnnotationOfType(
  final MemberHoldingTypeDetailsMetadataItem<?> metadata, final JavaType annotationType) {
 if (metadata == null || metadata.getMemberHoldingTypeDetails() == null) {
  return null;
 }
 return getAnnotationOfType(metadata.getMemberHoldingTypeDetails().getAnnotations(),
   annotationType);
}
origin: spring-projects/spring-roo

for (final AnnotationMetadata annotationMetadata : cid.getAnnotations()) {
 if (!annotationToMidMap.containsKey(annotationMetadata.getAnnotationType())) {
  annotationToMidMap.put(annotationMetadata.getAnnotationType(), new HashSet<String>());
origin: spring-projects/spring-roo

 @Override
 public Object getTagValue(final MemberHoldingTypeDetails type) {
  final AnnotationMetadata layerAnnotation =
    MemberFindingUtils.getAnnotationOfType(type.getAnnotations(), layerAnnotationType);
  if (layerAnnotation == null || layerAnnotation.getAttribute(domainTypesAttribute) == null) {
   return null;
  }
  final AnnotationAttributeValue<?> value = layerAnnotation.getAttribute(domainTypesAttribute);
  final List<JavaType> domainTypes = new ArrayList<JavaType>();
  if (value instanceof ClassAttributeValue) {
   domainTypes.add(((ClassAttributeValue) value).getValue());
  } else if (value instanceof ArrayAttributeValue<?>) {
   final ArrayAttributeValue<?> castValue = (ArrayAttributeValue<?>) value;
   for (final AnnotationAttributeValue<?> val : castValue.getValue()) {
    if (val instanceof ClassAttributeValue) {
     domainTypes.add(((ClassAttributeValue) val).getValue());
    }
   }
  }
  return domainTypes;
 }
}
origin: spring-projects/spring-roo

List<AnnotationMetadata> allDeclaredAnnotations = memberHoldingTypeDetails.getAnnotations();
for (AnnotationMetadata annotation : allDeclaredAnnotations) {
origin: org.springframework.roo/org.springframework.roo.classpath

 public List<MemberHoldingTypeDetails> matches(
   final List<MemberHoldingTypeDetails> memberHoldingTypeDetailsList) {
  final Map<String, MemberHoldingTypeDetails> matched =
    new HashMap<String, MemberHoldingTypeDetails>();
  for (final MemberHoldingTypeDetails memberHoldingTypeDetails : memberHoldingTypeDetailsList) {
   for (final AnnotationMetadata annotationMetadata : memberHoldingTypeDetails.getAnnotations()) {
    for (final JavaType annotationTypeToMatchOn : annotationTypesToMatchOn) {
     if (annotationMetadata.getAnnotationType().equals(annotationTypeToMatchOn)) {
      matched.put(memberHoldingTypeDetails.getDeclaredByMetadataId(),
        memberHoldingTypeDetails);
     }
    }
   }
  }
  return new ArrayList<MemberHoldingTypeDetails>(matched.values());
 }
}
origin: org.springframework.roo/org.springframework.roo.classpath

 public boolean isRequestingAnnotatedWith(final AnnotationMetadata annotationMetadata,
   final String requestingMid) {
  for (final MemberHoldingTypeDetails memberHoldingTypeDetails : details) {
   if (MemberFindingUtils.getAnnotationOfType(memberHoldingTypeDetails.getAnnotations(),
     annotationMetadata.getAnnotationType()) != null) {
    if (memberHoldingTypeDetails.getDeclaredByMetadataId().equals(requestingMid)) {
     return true;
    }
   }
  }
  return false;
 }
}
origin: org.springframework.roo/org.springframework.roo.classpath

for (final AnnotationMetadata annotationMetadata : cid.getAnnotations()) {
 if (!annotationToMidMap.containsKey(annotationMetadata.getAnnotationType())) {
  annotationToMidMap.put(annotationMetadata.getAnnotationType(), new HashSet<String>());
origin: org.springframework.roo/org.springframework.roo.classpath

/**
 * Returns the metadata for the annotation of the given type from within the
 * given metadata
 * 
 * @param metadata the metadata to search; can be <code>null</code>
 * @param annotationType the type of annotation for which to return the
 *            metadata; can be <code>null</code>
 * @return <code>null</code> if not found
 * @since 1.2.0
 */
public static AnnotationMetadata getAnnotationOfType(
  final MemberHoldingTypeDetailsMetadataItem<?> metadata, final JavaType annotationType) {
 if (metadata == null || metadata.getMemberHoldingTypeDetails() == null) {
  return null;
 }
 return getAnnotationOfType(metadata.getMemberHoldingTypeDetails().getAnnotations(),
   annotationType);
}
origin: org.springframework.roo/org.springframework.roo.classpath

 @Override
 public Object getTagValue(final MemberHoldingTypeDetails type) {
  final AnnotationMetadata layerAnnotation =
    MemberFindingUtils.getAnnotationOfType(type.getAnnotations(), layerAnnotationType);
  if (layerAnnotation == null || layerAnnotation.getAttribute(domainTypesAttribute) == null) {
   return null;
  }
  final AnnotationAttributeValue<?> value = layerAnnotation.getAttribute(domainTypesAttribute);
  final List<JavaType> domainTypes = new ArrayList<JavaType>();
  if (value instanceof ClassAttributeValue) {
   domainTypes.add(((ClassAttributeValue) value).getValue());
  } else if (value instanceof ArrayAttributeValue<?>) {
   final ArrayAttributeValue<?> castValue = (ArrayAttributeValue<?>) value;
   for (final AnnotationAttributeValue<?> val : castValue.getValue()) {
    if (val instanceof ClassAttributeValue) {
     domainTypes.add(((ClassAttributeValue) val).getValue());
    }
   }
  }
  return domainTypes;
 }
}
origin: org.springframework.roo/org.springframework.roo.addon.web.mvc.jsp

if (MemberFindingUtils.getAnnotationOfType(mhtd.getAnnotations(),
    RooJavaType.ROO_WEB_FINDER) != null) {
org.springframework.roo.classpath.detailsMemberHoldingTypeDetailsgetAnnotations

Popular methods of MemberHoldingTypeDetails

  • getLayerEntities
    If this is a layering component, for example a service or repository, returns the domain entities ma
  • getDeclaredMethods
  • getDeclaredFields
  • getExtendsTypes
    Lists the classes this type extends. This may be empty. Always empty in the case of an enum. While a
  • getDeclaredByMetadataId
  • getDeclaredConstructors
  • getImplementsTypes
    Lists the classes this type implements. Always empty in the case of an interface. A List is used to
  • getImports
    Lists the imports this class includes. Also obtains imports from ITDs.
  • getMethods
    Locates all methods on this class and its superclasses.
  • getType
  • getAnnotation
  • getCustomData
  • getAnnotation,
  • getCustomData,
  • getDeclaredConstructor,
  • getDeclaredField,
  • getDeclaredInitializers,
  • getDeclaredInnerType,
  • getDeclaredInnerTypes,
  • getDynamicFinderNames,
  • getField

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now