com.edugility.jpa.maven.plugin
Class AnnotationDB

java.lang.Object
  extended by org.scannotation.AnnotationDB
      extended by com.edugility.jpa.maven.plugin.AnnotationDB
All Implemented Interfaces:
Serializable, Cloneable

public class AnnotationDB
extends AnnotationDB
implements Cloneable

An AnnotationDB subclass that adds Cloneable support and the ability to clear state.

Since:
1.0-SNAPSHOT
Version:
1.0-SNAPSHOT
Author:
Laird Nelson
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.scannotation.AnnotationDB
AnnotationDB.CrossReferenceException
 
Field Summary
private static long serialVersionUID
          A serial version identifier uniquely identifying the version of this class.
 
Fields inherited from class org.scannotation.AnnotationDB
annotationIndex, classIndex, ignoredPackages, implementsIndex, scanClassAnnotations, scanFieldAnnotations, scanMethodAnnotations, scanParameterAnnotations
 
Constructor Summary
AnnotationDB()
          Creates a new AnnotationDB.
AnnotationDB(AnnotationDB db)
          Creates a new AnnotationDB, performing a deep copy of the state of the supplied AnnotationDB.
 
Method Summary
 void clear()
          Clears all transient state from this AnnotationDB.
 AnnotationDB clone()
          Returns a deep copy of this AnnotationDB.
private  void copyState(AnnotationDB db)
          Deeply copies all known state from the supplied AnnotationDB to this one.
 boolean getScanClassAnnotations()
          Returns whether this AnnotationDB should scan class annotations.
 boolean getScanFieldAnnotations()
          Returns whether this AnnotationDB should scan field annotations.
 boolean getScanMethodAnnotations()
          Returns whether this AnnotationDB should scan method annotations.
 boolean getScanParameterAnnotations()
          Returns whether this AnnotationDB should scan parameter annotations.
 void setScanClassAnnotations(boolean scan)
          Sets whether this AnnotationDB should scan class annotations.
 void setScanFieldAnnotations(boolean scan)
          
 void setScanMethodAnnotations(boolean scan)
          Sets whether this AnnotationDB should scan method annotations.
 void setScanParameterAnnotations(boolean scan)
          Sets whether this AnnotationDB should scan parameter annotations.
 
Methods inherited from class org.scannotation.AnnotationDB
addIgnoredPackages, crossReferenceImplementedInterfaces, crossReferenceMetaAnnotations, getAnnotationIndex, getClassIndex, getIgnoredPackages, outputAnnotationIndex, populate, scanArchives, scanClass, scanClass, scanFields, scanMethods, setIgnoredPackages
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
A serial version identifier uniquely identifying the version of this class. See the documentation for the Serializable class for details.

See Also:
Constant Field Values
Constructor Detail

AnnotationDB

public AnnotationDB()
Creates a new AnnotationDB.


AnnotationDB

public AnnotationDB(AnnotationDB db)
Creates a new AnnotationDB, performing a deep copy of the state of the supplied AnnotationDB.

Parameters:
db - the AnnotationDB whose state should be copied; may be null
Method Detail

copyState

private final void copyState(AnnotationDB db)
Deeply copies all known state from the supplied AnnotationDB to this one.

Specifically, this method copies the annotationIndex, classIndex and AnnotationDB.implementsIndex properties into new data structures. The elements within these data structures are not cloned.

This method also copies the boolean properties (scanClassAnnotations and the like).

Parameters:
db - the AnnotationDB whose state should be copied; may be null in which case no operation takes place

clone

public AnnotationDB clone()
Returns a deep copy of this AnnotationDB.

This method never returns null.

Overrides:
clone in class Object
Returns:
a deep copy of this AnnotationDB; never null

clear

public void clear()
Clears all transient state from this AnnotationDB.


getScanFieldAnnotations

public boolean getScanFieldAnnotations()
Returns whether this AnnotationDB should scan field annotations.

Returns:
true if this AnnotationDB should scan field annotations; false otherwise

setScanFieldAnnotations

public void setScanFieldAnnotations(boolean scan)

Overrides:
setScanFieldAnnotations in class AnnotationDB

getScanMethodAnnotations

public boolean getScanMethodAnnotations()
Returns whether this AnnotationDB should scan method annotations.

Returns:
true if this AnnotationDB should scan method annotations; false otherwise

setScanMethodAnnotations

public void setScanMethodAnnotations(boolean scan)
Sets whether this AnnotationDB should scan method annotations.

Overrides:
setScanMethodAnnotations in class AnnotationDB
Parameters:
scan - whether to scan method annotations

getScanParameterAnnotations

public boolean getScanParameterAnnotations()
Returns whether this AnnotationDB should scan parameter annotations.

Returns:
true if this AnnotationDB should scan parameter annotations; false otherwise

setScanParameterAnnotations

public void setScanParameterAnnotations(boolean scan)
Sets whether this AnnotationDB should scan parameter annotations.

Overrides:
setScanParameterAnnotations in class AnnotationDB
Parameters:
scan - whether to scan parameter annotations

getScanClassAnnotations

public boolean getScanClassAnnotations()
Returns whether this AnnotationDB should scan class annotations.

Returns:
true if this AnnotationDB should scan class annotations; false otherwise

setScanClassAnnotations

public void setScanClassAnnotations(boolean scan)
Sets whether this AnnotationDB should scan class annotations.

Overrides:
setScanClassAnnotations in class AnnotationDB
Parameters:
scan - whether to scan class annotations


Copyright © 2011-2013 Laird Nelson. All Rights Reserved.