edu.cmu.cs.crystal.annotations
Class AnnotationSummary

java.lang.Object
  extended by edu.cmu.cs.crystal.annotations.AnnotationSummary

public class AnnotationSummary
extends Object

Represents the annotations for a method declaration.

Since:
Crystal 3.4.0
Author:
ciera

Constructor Summary
AnnotationSummary(String[] paramNames)
           
 
Method Summary
 void add(AnnotationSummary summary)
           
 void addAllParameter(List<ICrystalAnnotation> annosToAdd, int ndx)
           
 void addAllReturn(List<ICrystalAnnotation> annosToAdd)
           
 void addParameter(ICrystalAnnotation anno, int ndx)
           
 void addReturn(ICrystalAnnotation anno)
           
 List<ICrystalAnnotation> getParameter(int ndx)
           
 ICrystalAnnotation getParameter(int ndx, String annoName)
          Returns the (first) annotation of the given type for the given parameter, if any.
 ICrystalAnnotation getParameter(String name, String annoName)
          Returns the (first) annotation of the given type for the given parameter, if any.
 String getParameterName(int ndx)
           
 String[] getParameterNames()
           
 List<ICrystalAnnotation> getReturn()
           
 ICrystalAnnotation getReturn(String annoName)
          Returns the (first) return annotation of the given type, if any.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationSummary

public AnnotationSummary(String[] paramNames)
Method Detail

getParameterName

public String getParameterName(int ndx)

getParameterNames

public String[] getParameterNames()

getParameter

public List<ICrystalAnnotation> getParameter(int ndx)
Parameters:
ndx - 0-based parameter index..
Returns:
A list of the annotations for a given parameter.

getParameter

public ICrystalAnnotation getParameter(int ndx,
                                       String annoName)
Returns the (first) annotation of the given type for the given parameter, if any. Notice that when using MultiAnnotation there can be multiple annotations of one type on a given Java element, but this method returns only the first one.

Parameters:
ndx - 0-based parameter index.
annoName - The type name of the annotation.
Returns:
The (first) annotation of the given type or null if this annotation does not exist.

getParameter

public ICrystalAnnotation getParameter(String name,
                                       String annoName)
Returns the (first) annotation of the given type for the given parameter, if any. Notice that when using MultiAnnotation there can be multiple annotations of one type on a given Java element, but this method returns only the first one.

Parameters:
name - The name of the parameter
annoName - The type name of the annotation.
Returns:
The (first) annotation of the given type or null if this annotation does not exist.

getReturn

public List<ICrystalAnnotation> getReturn()
Returns:
A list of the annotations for the return value

getReturn

public ICrystalAnnotation getReturn(String annoName)
Returns the (first) return annotation of the given type, if any. Notice that when using MultiAnnotation there can be multiple annotations of one type on a given Java element, but this method returns only the first one.

Parameters:
annoName - The type name of the annotation.
Returns:
The (first) annotation of the given type or null.

add

public void add(AnnotationSummary summary)

addReturn

public void addReturn(ICrystalAnnotation anno)

addAllReturn

public void addAllReturn(List<ICrystalAnnotation> annosToAdd)

addParameter

public void addParameter(ICrystalAnnotation anno,
                         int ndx)

addAllParameter

public void addAllParameter(List<ICrystalAnnotation> annosToAdd,
                            int ndx)