Package org.jboss.logging.processor.apt
Class ParameterFactory.MessageMethodParameter
- java.lang.Object
-
- org.jboss.logging.processor.apt.ParameterFactory.MessageMethodParameter
-
- All Implemented Interfaces:
java.lang.Comparable<Parameter>
,javax.lang.model.AnnotatedConstruct
,javax.lang.model.element.Element
,ClassType
,DelegatingElement
,Parameter
- Enclosing class:
- ParameterFactory
private static class ParameterFactory.MessageMethodParameter extends java.lang.Object implements Parameter
-
-
Field Summary
Fields Modifier and Type Field Description private MessageMethod
messageMethod
-
Constructor Summary
Constructors Modifier Constructor Description private
MessageMethodParameter(MessageMethod messageMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Parameter other)
boolean
equals(java.lang.Object obj)
java.lang.String
formatterClass()
The formatter class, ornull
if there is none.javax.lang.model.element.Element
getDelegate()
The element to delegate the default methods to.int
hashCode()
boolean
isArray()
Returnstrue
if the type is an array, otherwisefalse
.boolean
isAssignableFrom(java.lang.Class<?> type)
Determines if this type is either the same as, or is a supertype of, the class represented by thetype
parameter.boolean
isMessageMethod()
Indicates whether or not this parameter represents the message method.boolean
isPrimitive()
Returnstrue
if the type is a primitive type, otherwisefalse
.boolean
isSameAs(java.lang.Class<?> type)
Determines if this type is the same type as the class represented by thetype
parameter.boolean
isSubtypeOf(java.lang.Class<?> type)
Determines if this type is a subtype of the class represented by thetype
parameter.boolean
isVarArgs()
Returnstrue
if the parameter is a var args parameter, otherwisefalse
.java.lang.String
name()
The variable name of the parameter.java.lang.String
targetName()
Returns the name of the target field or method.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jboss.logging.processor.model.DelegatingElement
accept, asType, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getSimpleName, isAnnotatedWith
-
Methods inherited from interface org.jboss.logging.processor.model.Parameter
isFormatParameter
-
-
-
-
Field Detail
-
messageMethod
private final MessageMethod messageMethod
-
-
Constructor Detail
-
MessageMethodParameter
private MessageMethodParameter(MessageMethod messageMethod)
-
-
Method Detail
-
getDelegate
public javax.lang.model.element.Element getDelegate()
Description copied from interface:DelegatingElement
The element to delegate the default methods to.- Specified by:
getDelegate
in interfaceDelegatingElement
- Returns:
- the delegate
-
formatterClass
public java.lang.String formatterClass()
Description copied from interface:Parameter
The formatter class, ornull
if there is none.- Specified by:
formatterClass
in interfaceParameter
- Returns:
- the formatter class
-
targetName
public java.lang.String targetName()
Description copied from interface:Parameter
Returns the name of the target field or method. For example if the parameter is annotated with@Field
the target name is the name of the field to set on thereturn type
. If no target name is defined an empty String is returned.- Specified by:
targetName
in interfaceParameter
- Returns:
- the target field name, method name or an empty string.
-
name
public java.lang.String name()
Description copied from interface:Parameter
The variable name of the parameter.
-
isArray
public boolean isArray()
Description copied from interface:Parameter
Returnstrue
if the type is an array, otherwisefalse
.
-
isPrimitive
public boolean isPrimitive()
Description copied from interface:Parameter
Returnstrue
if the type is a primitive type, otherwisefalse
.- Specified by:
isPrimitive
in interfaceParameter
- Returns:
true
if primitive type, otherwisefalse
-
isVarArgs
public boolean isVarArgs()
Description copied from interface:Parameter
Returnstrue
if the parameter is a var args parameter, otherwisefalse
.
-
isMessageMethod
public boolean isMessageMethod()
Description copied from interface:Parameter
Indicates whether or not this parameter represents the message method.- Specified by:
isMessageMethod
in interfaceParameter
- Returns:
true
if this is the message method parameter
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejavax.lang.model.element.Element
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacejavax.lang.model.element.Element
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(Parameter other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Parameter>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isAssignableFrom
public boolean isAssignableFrom(java.lang.Class<?> type)
Description copied from interface:ClassType
Determines if this type is either the same as, or is a supertype of, the class represented by thetype
parameter. If this type is assignable from the classtrue
is returned, otherwisefalse
.- Specified by:
isAssignableFrom
in interfaceClassType
- Parameters:
type
- the class type to check.- Returns:
true
if this type is the same as or a superclass of the class, otherwisefalse
.
-
isSubtypeOf
public boolean isSubtypeOf(java.lang.Class<?> type)
Description copied from interface:ClassType
Determines if this type is a subtype of the class represented by thetype
parameter. If this type is a subtype of the classtrue
is returned, otherwisefalse
.- Specified by:
isSubtypeOf
in interfaceClassType
- Parameters:
type
- the class type to check.- Returns:
true
if this type is a subtype of the class, otherwisefalse
.
-
isSameAs
public boolean isSameAs(java.lang.Class<?> type)
Description copied from interface:ClassType
Determines if this type is the same type as the class represented by thetype
parameter. If this type is the same type as the classtrue
is returned, otherwisefalse
.
-
-