[ 
https://issues.apache.org/jira/browse/CAMEL-8738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-8738.
--------------------------------
    Resolution: Not A Problem

Its not for nested inner classes.

> Referring to constants using type
> ---------------------------------
>
>                 Key: CAMEL-8738
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8738
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-language
>    Affects Versions: 2.15.0
>         Environment: Windows 7
>            Reporter: Umair Saleem
>            Priority: Minor
>             Fix For: 2.15.0
>
>
> Hi,
> In documentation link http://camel.apache.org/simple.html following is written
> Camel 2.11: To refer to a type or field by its FQN name. To refer to a field 
> you can append .FIELD_NAME. For example you can refer to the constant field 
> from Exchange as: org.apache.camel.Exchange.FILE_NAME
> When I tried it it works. 
> But for example I have class Constants which contain inner class 
> InnerConstants which have a field. I cannot access it from following way.
> ${type:Constants.InnerConstants.fieldName}. 
> Exception Found: Cannot find class Constants.InnerConstants.fieldName
> Following is the structure of my Constant class
> class Constants  {
>       public static String test ="Test1234";
>       public static class InnerConstants {
>               public static String fieldName = "fieldName"
>       }
> }
> My route was:
> <route>
>              <camel:from uri="stream:in" />
>              
> <camel:setBody><simple>${type:Constants.InnerConstants.fieldName}</simple></camel:setBody>
>              <log loggingLevel="INFO" message="${body}" />
> </route>
> Let me know if you need any other clarification.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to