public class RestMethod extends Element
| Modifier and Type | Method and Description |
|---|---|
static RestMethod |
create(Method method,
RestKind kind,
java.lang.String collectionName,
java.lang.String customMethodName)
Create a new REST method.
|
Method |
getBaseMethod()
Returns the underlying method element.
|
java.lang.String |
getFullName()
Returns a fully qualified name for the element.
|
TypeRef |
getInputType()
Get the input type of the underlying method.
|
Location |
getLocation()
Returns the location associated with this element.
|
Model |
getModel()
Returns the model associated with this element.
|
TypeRef |
getOutputType()
Get the output type of the underlying method.
|
static RestMethod |
getPrimaryRestMethod(Method method)
Delivers the primary REST method associated with the given RPC method.
|
java.lang.String |
getRestCollectionName()
Returns the rest collection name.
|
java.lang.String |
getRestCollectionNameNoVersion()
Returns the rest collection name without version prefix.
|
java.lang.String |
getRestCustomMethodName()
Returns the rest custom method name.
|
java.lang.String |
getRestFullMethodName()
Returns the full REST method name.
|
java.lang.String |
getRestFullMethodNameNoVersion()
Returns the full rest name without the version string.
|
RestKind |
getRestKind()
Returns the rest kind.
|
java.lang.String |
getRestMethodName()
Returns the rest method name.
|
java.lang.String |
getSimpleName()
Returns a simple name for the element.
|
java.lang.String |
getSimpleRestCollectionName()
Returns the rest collection name.
|
java.lang.String |
getVersionWithDefault()
Returns the full name with version prefix stripped if the full name has it.
|
boolean |
isReachable()
Returns if the rest method reachable with current scoper.
|
void |
setRestCollectionName(java.lang.String restCollectionName)
Sets the rest collection name.
|
void |
setRestCustomMethodName(java.lang.String restCustomMethodName)
Sets the rest custom method name.
|
void |
setRestKind(RestKind kind)
Sets the rest kind.
|
java.lang.String |
toString() |
addAttribute, getAttribute, getAttributeOrDefault, hasAttribute, putAttribute, removeAttributepublic static RestMethod create(Method method, RestKind kind, java.lang.String collectionName, java.lang.String customMethodName)
@Nullable public static RestMethod getPrimaryRestMethod(Method method)
public Location getLocation()
ElementgetLocation in class Elementpublic Model getModel()
Elementpublic java.lang.String getFullName()
ElementgetFullName in class Elementpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getSimpleName()
ElementgetSimpleName in class Elementpublic TypeRef getInputType()
public TypeRef getOutputType()
public Method getBaseMethod()
public java.lang.String getRestFullMethodName()
public java.lang.String getRestFullMethodNameNoVersion()
public boolean isReachable()
public java.lang.String getRestMethodName()
public java.lang.String getRestCustomMethodName()
public RestKind getRestKind()
public java.lang.String getRestCollectionName()
public java.lang.String getSimpleRestCollectionName()
public java.lang.String getRestCollectionNameNoVersion()
public void setRestKind(RestKind kind)
public void setRestCustomMethodName(java.lang.String restCustomMethodName)
public void setRestCollectionName(java.lang.String restCollectionName)
public java.lang.String getVersionWithDefault()