Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.jdeveloper.java.util
Class VariableNaming

java.lang.Object
  extended by oracle.jdeveloper.java.util.VariableNaming

public final class VariableNaming
extends java.lang.Object


Nested Class Summary
static class VariableNaming.NameFormater
           
 
Field Summary
static VariableNaming.NameFormater CONSTANT_FORMATER
           
static VariableNaming.NameFormater FIELD_FORMATER
           
static VariableNaming.NameFormater PARAMETER_FORMATER
           
static VariableNaming.NameFormater VARIABLE_FORMATER
           
 
Method Summary
static java.lang.String canIntroduceField(SourceElement sourceElement, java.lang.String fieldName)
          Verifies if a field can added introduced to the class that contains the SourceElement.
static boolean canIntroduceVariable(SourceElement sourceElement, java.lang.String variableName)
           
static void fillWithParentVariableDeclaration(SourceElement sourceElement, java.util.HashSet<java.lang.String> existingNames)
          Fills the set with the existing variable declarations visible from the sourceElement
static java.util.List<java.lang.String> suggestConstantNames(SourceElement sourceElement, java.lang.String typeName)
           
static java.util.List<java.lang.String> suggestFieldNames(SourceElement sourceElement, java.lang.String typeName)
           
static java.util.List<java.lang.String> suggestNamesFromCamelWord(java.lang.String shortName)
           
static java.util.List<java.lang.String> suggestNamesFromCamelWord(java.lang.String shortName, VariableNaming.NameFormater nameFormater)
           
static java.util.List<java.lang.String> suggestParameterNames(SourceElement sourceElement, java.lang.String typeName)
           
static java.util.List<java.lang.String> suggestVariableNames(SourceElement sourceElement, java.lang.String typeName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_FORMATER

public static final VariableNaming.NameFormater FIELD_FORMATER

CONSTANT_FORMATER

public static final VariableNaming.NameFormater CONSTANT_FORMATER

VARIABLE_FORMATER

public static final VariableNaming.NameFormater VARIABLE_FORMATER

PARAMETER_FORMATER

public static final VariableNaming.NameFormater PARAMETER_FORMATER
Method Detail

canIntroduceVariable

public static boolean canIntroduceVariable(SourceElement sourceElement,
                                           java.lang.String variableName)
Returns:
true if variableName does not already represent something at sourceElement. Something can be a variable name, a field name, a class name, ...

suggestNamesFromCamelWord

public static java.util.List<java.lang.String> suggestNamesFromCamelWord(java.lang.String shortName)

suggestNamesFromCamelWord

public static java.util.List<java.lang.String> suggestNamesFromCamelWord(java.lang.String shortName,
                                                                         VariableNaming.NameFormater nameFormater)

suggestVariableNames

public static java.util.List<java.lang.String> suggestVariableNames(SourceElement sourceElement,
                                                                    java.lang.String typeName)

suggestParameterNames

public static java.util.List<java.lang.String> suggestParameterNames(SourceElement sourceElement,
                                                                     java.lang.String typeName)

suggestFieldNames

public static java.util.List<java.lang.String> suggestFieldNames(SourceElement sourceElement,
                                                                 java.lang.String typeName)
Returns:
an ArrayList of String

suggestConstantNames

public static java.util.List<java.lang.String> suggestConstantNames(SourceElement sourceElement,
                                                                    java.lang.String typeName)
Returns:
an ArrayList of String

fillWithParentVariableDeclaration

public static void fillWithParentVariableDeclaration(SourceElement sourceElement,
                                                     java.util.HashSet<java.lang.String> existingNames)
Fills the set with the existing variable declarations visible from the sourceElement


canIntroduceField

public static java.lang.String canIntroduceField(SourceElement sourceElement,
                                                 java.lang.String fieldName)
Verifies if a field can added introduced to the class that contains the SourceElement. It will verify that the field name is a valid field identifier, that it does not already exist and that it does not override a variable in the method that contains the sourceElement

Parameters:
sourceElement -
fieldName -
Returns:
the error message if it is not a valid variable name

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.