-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
140 changed files
with
2,701 additions
and
2,648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
api/src/main/java/org/jboss/forge/parser/java/Annotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright 2012-2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.parser.java; | ||
|
||
import java.util.List; | ||
|
||
import org.jboss.forge.parser.Internal; | ||
import org.jboss.forge.parser.Origin; | ||
|
||
/** | ||
* Represents an annotation on some Java element. | ||
* | ||
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> | ||
*/ | ||
public interface Annotation<O extends JavaType<O>> extends Internal, Origin<O> | ||
{ | ||
boolean isSingleValue(); | ||
|
||
boolean isMarker(); | ||
|
||
boolean isNormal(); | ||
|
||
String getName(); | ||
|
||
String getQualifiedName(); | ||
|
||
<T extends Enum<T>> T getEnumValue(Class<T> type); | ||
|
||
<T extends Enum<T>> T getEnumValue(Class<T> type, String name); | ||
|
||
<T extends Enum<T>> T[] getEnumArrayValue(Class<T> type); | ||
|
||
<T extends Enum<T>> T[] getEnumArrayValue(Class<T> type, String name); | ||
|
||
String getLiteralValue(); | ||
|
||
String getLiteralValue(String name); | ||
|
||
List<ValuePair> getValues(); | ||
|
||
String getStringValue(); | ||
|
||
String getStringValue(String name); | ||
|
||
Annotation<O> getAnnotationValue(); | ||
|
||
Annotation<O> getAnnotationValue(String name); | ||
|
||
Class<?> getClassValue(); | ||
|
||
Class<?> getClassValue(String name); | ||
|
||
Class<?>[] getClassArrayValue(); | ||
|
||
Class<?>[] getClassArrayValue(String name); | ||
} |
67 changes: 67 additions & 0 deletions
67
api/src/main/java/org/jboss/forge/parser/java/AnnotationElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.parser.java; | ||
|
||
import org.jboss.forge.parser.Origin; | ||
|
||
/** | ||
* Represents an element definition of a {@link JavaAnnotation}. | ||
* | ||
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> | ||
* @author Matt Benson | ||
*/ | ||
public interface AnnotationElement<O extends JavaAnnotation<O>> extends AnnotationTarget<O>, | ||
Origin<O>, Named | ||
{ | ||
/** | ||
* Represents the default value of a given {@link AnnotationElement}. | ||
*/ | ||
public interface ReadDefaultValue<O extends JavaAnnotation<O>> | ||
{ | ||
String getString(); | ||
|
||
String getLiteral(); | ||
|
||
<T extends Enum<T>> T getEnum(Class<T> type); | ||
|
||
<T extends Enum<T>> T[] getEnumArray(Class<T> type); | ||
|
||
Annotation<O> getAnnotation(); | ||
|
||
Class<?> getSingleClass(); | ||
|
||
Class<?>[] getClassArray(); | ||
} | ||
|
||
/** | ||
* Get this annotation element's type. | ||
*/ | ||
String getType(); | ||
|
||
/** | ||
* Get this annotation element's fully qualified type. | ||
*/ | ||
String getQualifiedType(); | ||
|
||
/** | ||
* Get this annotation element's {@link Type} | ||
*/ | ||
Type<O> getTypeInspector(); | ||
|
||
/** | ||
* Attempt to determine if this annotation element is of the same type as the given type. | ||
*/ | ||
boolean isType(Class<?> type); | ||
|
||
/** | ||
* Attempt to determine if this annotation element is of the same type as the given type. | ||
*/ | ||
boolean isType(String type); | ||
|
||
ReadDefaultValue<O> getDefaultValue(); | ||
} |
31 changes: 31 additions & 0 deletions
31
api/src/main/java/org/jboss/forge/parser/java/AnnotationTarget.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2012 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.parser.java; | ||
|
||
import java.util.List; | ||
|
||
import org.jboss.forge.parser.Internal; | ||
import org.jboss.forge.parser.Origin; | ||
|
||
/** | ||
* Represents a Java element that may carry annotations. | ||
* | ||
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> | ||
*/ | ||
public interface AnnotationTarget<O extends JavaType<O>> extends Internal, Origin<O> | ||
{ | ||
public List<? extends Annotation<O>> getAnnotations(); | ||
|
||
public boolean hasAnnotation(final Class<? extends java.lang.annotation.Annotation> type); | ||
|
||
public boolean hasAnnotation(final String type); | ||
|
||
public Annotation<O> getAnnotation(final Class<? extends java.lang.annotation.Annotation> type); | ||
|
||
public Annotation<O> getAnnotation(final String type); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
api/src/main/java/org/jboss/forge/parser/java/Extendable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright 2012 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.parser.java; | ||
|
||
/** | ||
* Represents a {@link JavaType} that can extend other types (Java inheritance and interfaces). | ||
* | ||
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> | ||
* | ||
*/ | ||
public interface Extendable<O extends JavaType<O>> | ||
{ | ||
/** | ||
* Get this type's super class. | ||
* | ||
* @see #setSuperType(String) | ||
*/ | ||
public String getSuperType(); | ||
} |
Oops, something went wrong.