LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor Class Reference

AST visitor class. More...

Inherits VoidVisitorAdapter< Object >.

+ Collaboration diagram for org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor:

Public Member Functions

void visit (final PackageDeclaration p_package, final Object p_arg)
 
void visit (final ClassOrInterfaceDeclaration p_class, final Object p_arg)
 
void visit (final EnumDeclaration p_enum, final Object p_arg)
 
void visit (final MethodCallExpr p_methodcall, final Object p_arg)
 

Package Functions

final Set< String > labels ()
 returns the translated labels More...
 

Private Member Functions

String label (final String p_line)
 gets the class name and label name More...
 

Static Private Member Functions

static String buildlabel (final String p_package, final String p_outerclass1, final String p_outerclass2, final String p_innerclass, final String p_label)
 returns full qualified class name (inner & outer class) More...
 

Private Attributes

String m_innerclass = ""
 inner class name * More...
 
final Set< String > m_label = new HashSet<>()
 label set More...
 
String m_outerclass = ""
 outer class name * More...
 
String m_package = ""
 package name * More...
 

Static Private Attributes

static final Pattern LANGUAGEMETHODPATTERN = Pattern.compile( TRANSLATEMETHODNAME + ".+?\\)" )
 reg expression to extract label data More...
 
static final String TRANSLATEMETHODNAME = "CCommon.languagestring"
 method to translate strings More...
 

Detailed Description

Definition at line 298 of file TestCLanguageLabels.java.

Member Function Documentation

◆ buildlabel()

static String org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.buildlabel ( final String  p_package,
final String  p_outerclass1,
final String  p_outerclass2,
final String  p_innerclass,
final String  p_label 
)
staticprivate
Parameters
p_packagepackage name
p_outerclass1outer class readed value
p_outerclass2outer class fixed value
p_innerclassinner class
p_labellabel (only firat element is used)
Returns
full-qualified class name

Definition at line 417 of file TestCLanguageLabels.java.

Referenced by org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.label().

+ Here is the caller graph for this function:

◆ label()

String org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.label ( final String  p_line)
private
Parameters
p_lineinput trimmed line
Returns
label or empty string

Definition at line 384 of file TestCLanguageLabels.java.

References org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.buildlabel(), and org.lightjason.agentspeak.common.CCommon.PACKAGEROOT.

Referenced by org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.visit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ labels()

final Set<String> org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.labels ( )
package
Returns
set with labels

Definition at line 330 of file TestCLanguageLabels.java.

References org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.m_label.

Referenced by org.lightjason.agentspeak.TestCLanguageLabels.testResourceString().

+ Here is the caller graph for this function:

◆ visit() [1/4]

void org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.visit ( final PackageDeclaration  p_package,
final Object  p_arg 
)

Definition at line 336 of file TestCLanguageLabels.java.

Referenced by org.lightjason.agentspeak.TestCLanguageLabels.testResourceString().

+ Here is the caller graph for this function:

◆ visit() [2/4]

void org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.visit ( final ClassOrInterfaceDeclaration  p_class,
final Object  p_arg 
)

Definition at line 343 of file TestCLanguageLabels.java.

◆ visit() [3/4]

void org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.visit ( final EnumDeclaration  p_enum,
final Object  p_arg 
)

Definition at line 356 of file TestCLanguageLabels.java.

◆ visit() [4/4]

void org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.visit ( final MethodCallExpr  p_methodcall,
final Object  p_arg 
)

Definition at line 369 of file TestCLanguageLabels.java.

References org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.label().

+ Here is the call graph for this function:

Member Data Documentation

◆ LANGUAGEMETHODPATTERN

final Pattern org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.LANGUAGEMETHODPATTERN = Pattern.compile( TRANSLATEMETHODNAME + ".+?\\)" )
staticprivate

Definition at line 307 of file TestCLanguageLabels.java.

◆ m_innerclass

String org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.m_innerclass = ""
private

Definition at line 311 of file TestCLanguageLabels.java.

◆ m_label

final Set<String> org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.m_label = new HashSet<>()
private

◆ m_outerclass

String org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.m_outerclass = ""
private

Definition at line 315 of file TestCLanguageLabels.java.

◆ m_package

String org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.m_package = ""
private

Definition at line 319 of file TestCLanguageLabels.java.

◆ TRANSLATEMETHODNAME

final String org.lightjason.agentspeak.TestCLanguageLabels.CJavaVistor.TRANSLATEMETHODNAME = "CCommon.languagestring"
staticprivate

Definition at line 303 of file TestCLanguageLabels.java.