Use of forward declaration

Hi Experts,
               Please let me know the use of forward declaration for a class. How to use that?
Thanks and Regards,
Debarshi

Hi,
Absolutely true matt...
you use forward declaration when you want to indicate that this component will be defined later but i am referring to this as of now.
so that it does not give any syntax/ run time error.
Rgds/Abhi

Similar Messages

  • Forward Declaration in Class Builder

    Hi All,
       In the Class Builder (SE24)when i create a new Class, There is an option of Forward declaration  in the Property Tab. In this, we can add Type Group Interface and Class. What is the Purpose of this forward declaration?
      The F1 help does not provide any help.
    Regards,
    Kapil.

    in addition to above replies, it can be used for classes and interfaces in that case Forward declaration is equivalent to
    CLASS <class_name> DEFINITION LOAD.
    interface <interface_name> load
    statements which are normally used in Program ( case for local classes )
    use of Load from SAP docu
    ... LOAD
    Effect
    The variant with the LOAD addition loads a global class class from the Class Library. This statement was needed before Release 6.20 if you wanted to access one of the static components of class from within a program, or to declare an event handler for class before class had been loaded automatically. From Release 6.20 onwards, the LOAD addition is only needed if the compilation of an ABAP program fails because it includes recursive accesses of a globa l class. In such cases, you may be able to make the program compilable by explicitly loading the class before recursion.
    Thanks,
    kranthi.

  • Forward Declaration and "this" keyword

    Consider this code:
    class A {
       private int i = 2 * this.j;  // This will be calculated as 2 * 0 = 0
    //   private int i = 2 * j;  //This code will not compile
       private int j = 20;
    }Why the "this" keyword is required for the j to be accessible? Though it is a forward declaration, what is the significance of "this" which gives visibility to the variable j. Please give some light to this.

    Though it is a forward declaration, what is the significance of "this" which gives
    visibility to the variable jI don't think "this" alters the visibility of j: that is the instance variable j is in scope. However "Use of instance variables whose declarations appear textually after the use is sometimes restricted, even though these instance variables are in scope."
    See "8.3.2.3 Restrictions on the use of Fields during Initialization" http://java.sun.com/docs/books/jls/third_edition/html/classes.html#287410
    Using "this" you have a reference to the object being constructed with the j instance variable sill having its default value of zero.
    Such instance initialisers would appear to be inherently less intelligible than using a constructor.

  • Package forward declaration

    Can anyone kindly explain me in detail about Package forward declaration and where this is used and what's the purpose of using it.A example would be good
    Thanks in advance

    A subprogram declaration called a
    forward declaration. It consists of the subprogram
    specification in the package body .
    CREATE OR REPLACE PACKAGE BODY declare_forward
    IS
    PROCEDURE pro(. . .);      -- forward declaration
    PROCEDURE pro2(. . .)
    IS                         -- subprograms defined
    BEGIN           -- in alphabetical order
    pro(. . .);
    END;
    END declare_forward;

  • Forward declaration concept

    hi,
    i have a package
    CREATE OR REPLACE PACKAGE BODY pkgemp AS
    FUNCTION fNeedsCpeReview(
    p_order_id IN VARCHAR2 DEFAULT NULL)
    RETURN product_info_tbl
    is
    CURSOR csr_ord_control IS
    SELECT action_cd
    FROM ord_control
    WHERE order_id = l_order_id;
    begin
    select * from abc where enum=1234;
    execute immediate create table abc(
    enum number);
    END pkgemp;
    -- please forget abt the function and cursor.
    -- the table 'abc' is not present in the DB
    -- so we cannot execute select statement and compilation error even though we are creatign that table after 'select' statement
    -- we need to do forward declarartion.
    my question is how do we do a forward declaration for creating a table ?

    Hi,
    Creating tables in procedures is rarely necessary in Oracle.
    Describe what you're trying to do, and someone will suggest a good way to do it. Many people have used global temporary tables where they thought creating a table on the fly was necessary.
    If you really do have to use table (abc) that may not exist at compile time, or if abc may be dropped and recreated after the procedure is compiled, then do everything that involves abc using dynamic SQL.
    Remember that EXECUTE IMMEDIATE works on strings, so
    execute immediate create table abc(
    enum number);is incorrect, but
    execute immediate 'create table abc(
                                       enum number)';will work.

  • No logical forward declared in action {0} in Web Channel

    Hello
    We are getting this error (No logical forward declared in action ) in CRM Web Channel when we are trying to retrieve a service order.
    Any Ideas????

    Hello,
    I would guess that this maybe due to come config in your struts-config.xml
    I would check the f tansaction type that is been used and the transaction category
    The only transaction category working with ICSS are:                                   
    - BUS2000116                                                                       
    - BUS2000120                                                                       
    - BUS2000112                  
    Regards
    Mark

  • Forward Declarations

    hi all,
    can anyone explain me abt forward declarations in PLSQL

    Forward Declaration:
    A forward declaration consists of a subprogram spec terminated by a semicolon.
    SQL> declare
      2   procedure proc1(p1 varchar2);--Forward
      3   procedure proc2 is
      4   begin
      5     proc1('Hai');--Used here without defining
      6   end;
      7   procedure proc1(p1 varchar2) is[b]--defined here
      8   begin
      9    dbms_output.put_line(p1);
    10   end;
    11  begin
    12   proc2;
    13  end;
    14  /
    Hai
    PL/SQL procedure successfully completed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Receiving the warning of class forward declaration

    I am trying to build the Clustering Plug in project on my Leopard. I have following 2 queries -
    In that project an interface class is defined as
    @interface ClusteringController : NSWindowController { ....... ..... .... } @end.
    And this class is used in implementation class using forward declaration as follows
    @class ClusteringController;
    then in one fuction it is used as follows
    (long) filterImage:(NSString*) menuName {
    ClusteringController *cluster = [[ClusteringController alloc] init]; [cluster showWindow:self]; return 0; }
    When i try to build this project it showing a warning as follows
    warning: receiver 'ClusteringController' is a forward class and corresponding @interface may not exist
    Also there is 1 more warning is coming
    warning: no '-updateProxyWhenReconnect' method found
    This warning is coming for the following line of code
    if(delegate) [delegate updateProxyWhenReconnect];
    Can anybody help me to overcome these warnings?

    shaktirsg wrote:
    And this class is used in implementation class using forward declaration as follows
    @class ClusteringController;
    An implementation requires an #import of the entire interface file for any class used in the code. As a rule:
    Use @class when a class is used in an @interface
    Use #import when a class is used in an @implementation
    if(delegate) \[delegate updateProxyWhenReconnect\];
    warning: no '- updateProxyWhenReconnect' method found
    It looks like the compiler doesn't know the class of 'delegate'. Can we see the code that sets the 'delegate' variable? Also please let us know where updateProxyWhenReconnect is declared. Is it declared in the interface for the class to which 'delegate' belongs? If so, it might be good for us to also see that @interface file.
    \- Ray

  • In Firefox 3.6.10 I was able to go forward and backwards between pages without the page defaulting to the top of the page. Is there any way to prevent the page from automatically moving to the top when using the forwards and back buttons in Firefox Four?

    I like to be able to navigate backwards and forwards without having to scroll down and find where I was previously. In Firefox Four, when using the forwards and back buttons, the page will automatically return to the top of the page. Is there any way to change this setting in Firefox Four to prevent it from doing that?

    Thanks for the response. No Time Machine, but I probably have a backup from a few months ago on an external hard drive. :/ I guess it'd have useful history, but not if it overwrote the last 3 months or so of Awesome Bar, that might not be so great.

  • BPEL SCA: XML-20129: (Error) Namespace prefix 'ui' used but not declared.

    SOASuite 11g
    Oracle Weblogic Server 10.3.3
    Oracle Solaris on SPARC (64-bit) 10
    Database: Oracle Server - Enterprise Edition 10.2.0.5
    When I start the SOA domain server, I find the following in the log file:
    <Feb 25, 2011 10:41:23 AM CET> <Error> <org.apache.commons.digester.Digester> <BEA-000000> <Parse Error at line 9 column 79: <Line 9,
    Column 79>: XML-20129: (Error) Namespace prefix 'ui' used but not declared.
    org.xml.sax.SAXParseException: <Line 9, Column 79>: XML-20129: (Error) Namespace prefix 'ui' used but not declared.
    at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:342)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
    at org.apache.commons.digester.Digester.parse(Digester.java:1785)
    at oracle.fabric.composite.Parser.parseComposite(Parser.java:132)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.deployComposite(WLSFabricKernelInitializer.java:493)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.prepareCompositeDeployments(WLSFabricKernelInitializer.java:
    239)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.init(WLSFabricKernelInitializer.java:127)
    at javax.servlet.GenericServlet.init(GenericServlet.java:241)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1976)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1950)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1869)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
    at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    My composite.xml is:
    <composite name="JIPSYHandleRTOTaskEBF" revision="1.0" mode="active" state="on"
    xmlns="http://xmlns.oracle.com/sca/1.0"
    xmlns:ui="http://xmlns.oracle.com/soa/designer/"^M
    xmlns:xs="http://www.w3.org/2001/XMLSchema">^M
    <import location="GetTimeoutPeriod.wsdl" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetTimeoutPeriod/"/>
    <service ui:wsdlLocation="JIPSYHandleRTOTaskEBF.wsdl" name="client">
    </composite>
    But when it has been deployed, I see that this has been changed into:
    <composite name="JIPSYHandleRTOTaskEBF" revision="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <import location="GetTimeoutPeriod.wsdl" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetTimeoutPeriod/"/>
    <service ui:wsdlLocation="JIPSYHandleRTOTaskEBF.wsdl" name="client">
    </composite>
    (I exported this from MDS).
    Apparently, some namespaces are stripped.
    This appears to happen during the deploy (using ant), because the version in the generated jar file is already missing the namespaces.
    The BPEL processes appear to work fine though.
    Why is this happening and how can I prevent these errors?

    I've fiddled around with the file composite.xml and found the following workaround:
    If I change the start of the file to:
    <?xml version="1.0" encoding="UTF-8"?>
    <composite name="JIPSYUpdateWorkflowReqABCSImpl"
    xmlns="http://xmlns.oracle.com/sca/1.0"
    xmlns:ui="http://xmlns.oracle.com/soa/designer/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    revision="1.0"
    mode="active"
    state="on">
    it remains unchanged and the errors during deployment are gone.

  • Error:  Namespace prefix 'split-by-page-break' used but not declared.

    I have my machine reimaged, now when I try to preview an rtf template I get the below error. Nothing has changed in my template and I am using 1.0.0 Build 9 as before my reimage as well. This is an uregent problem that I am not able to find the solution for on my own. Please advise with any help.
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'split-by-page-break' used but not declared.
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:782)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:564)
         ... 14 more
    Thanks

    I'm just new to XMLP and am receiving the same error.. My error is occuring when trying to use sub-templates in my master template.
    I believe I have the syntax correct:
    To import template file:
    <?import:file:h:///CN_LTR_TEMPLATES.rtf?>
    to call the sub-template:
    <?call-template: signature:?>
    Its the call-template to signature thats generating my error message.. My only thought is that its not calling my import properly..
    Anyway.. Hope this might help you a bit.. you never mentioned anything about using a sub-templates. Perhaps since you formated your computer, your template may be in a different location or gone all together (that is if you are using sub-templates).
    If i figure anything out in the mean time, i'll let you know..
    Edited by: user8682333 on Aug 16, 2009 6:51 AM

  • Namespace Problem? Namespace prefix used but not declared.

    Hello Guru's,
    I am new to XSL templates, while genrating XML publisher report with these template, I am getting below "namespace" error:
    If I remove the "set:"/"str:" expressions from the template, it works fine. Is there anything syntactically wrong in the expression? but not getting the results
    Getting "Caused by: oracle.xdo.parser.v2.XMLParseException: Namespace prefix 'str' used but not declared." error while using this code
                             <xsl:call-template name="str:generate-string">
                                  <xsl:with-param name="text" select="' '"/>
                                  <xsl:with-param name="count" select="30"/>
                             </xsl:call-template>
    Getting "Caused by: oracle.xdo.parser.v2.XMLParseException: Namespace prefix 'set' used but not declared." error while using this code
         <xsl:template name="distinct">
              <xsl:param name="nodes" select="/.."/>
              <xsl:param name="distinct" select="/.."/>
              <xsl:choose>
                   <xsl:when test="$nodes">
                        <xsl:call-template name="distinct">
                             <xsl:with-param name="distinct" select="$distinct | $nodes[1][not(. = $distinct)]"/>
                             <xsl:with-param name="nodes" select="$nodes[position() &gt; 1]"/>
                        </xsl:call-template>
                   </xsl:when>
                   <xsl:otherwise>
                        <xsl:apply-templates select="$distinct" mode="set:distinct"/>
                   </xsl:otherwise>
              </xsl:choose>
         </xsl:template>
    I would appreciate any help in this regard.
    SA

    Declare them in the namespace :)
    <?xml version='1.0' encoding='windows-1252'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template name="distinct">
    <xsl:param name="nodes" select="/.."/>
    , </xsl:stylesheet>

  • Namespace prefix 'xdosxlt' used but not declared

    I'm trying to remove duplicate data from my dataset (below)
    <MAIN>
    <PODATA>
    <PRJ>..
    </PRJ>
    <PRJ>..
    </PRJ>
    </PODATA>
    <PRJ>..
    </PRJ>
    <PRJ>..
    </PRJ>
    <PODATA>
    </PODATA>
    and followed code as given in below link but getting error message *"Namespace prefix 'xdosxlt' used but not declared"*
    https://blogs.oracle.com/xmlpublisher/entry/removin_duplicates
    In short:_
    Added a variable as
    <?variable:metrics;xdosxlt:distinct_values(PODATA)?>
    and in for loop referring as
    <?for-each:$metrics?><?sort:PONUMBER;'ascending';data-type='text'?>
    I cannot change the SQL as I need data on 2 group levels separately.
    Can you pls assist? I'm EBS 11i and BIP Template Builder for Word 10.1.3.4.2
    Edited by: oraclepro73 on May 8, 2012 3:19 PM

    Hi ,
    When i tried
    <?variable:metrics;xdosxlt:distinct_values(DISTRIBUTIONS_ROW)?>
    i get an error, any idea please?
    Thanks,
    Husam

  • Using a Forward Slash (/) in CFFILE Destination

    Hi everyone,
    I couldn't find this anywhere in the forums (at least not
    searching for "cffile forward slash", "cffile /", or "cffile
    destination") and hope I'm posting this in the correct place
    (please let me know if not). I need to use a forward slash (/) in
    the name of a file using cffile, but when I try to set destination
    = "c:\directory\file/name.txt" cf throws an exception and tells me
    that the system can't find the "c:\directory\file\" directory. Is
    there a way to froce ColdFusion to interpret the forward slash as
    part of the file name instead of a directory structure character?
    By the way I'm using ColdFusion 6.1 Standard Edition on a Windows
    box (obviously).

    quote:
    Originally posted by:
    Newsgroup User
    I could be wrong on that. I was not going on personal
    experience, just
    something that stuck in my mind when reading something. I
    cannot find the
    URL @ present, but I'm sure I read that the only actual
    *illegal* character
    in a *nix file name is the NULL character. But experience
    trumps reading.
    The best I could find is this:
    http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/iisbook/c03_converting _unix_file_names_and_pathnames.mspx?mfr=true.
    Although that is not where I originally read it.
    Adam
    The above sounds right and seems to be generally correct in
    practice (I'm testing by transferring files from OSX to Windows),
    with the exception of the "/" character. It's possible that "/"
    isn't, in fact, illegal to a *nix OS, but just isn't valid as a
    file name in any applications (including those that ship wtih the
    OS).
    However, It's also possible (read: probable) that I have no
    idea what I'm talking about. I'll see what I can find and post it
    here, would be good to know as I'm sure others have run into this
    (and I'm sure this won't be the last time I'm given a ridiculous
    naming convention).

  • Duplex print setup error - Namespace prefix 'section' used but not declared

    Hi All, I am getting the below error while trying to preview as PDF document. The issue seems to be caused by adding the below to form field in the rtf template (removing the below i can view the PDF document but it does not work as expected ie printing the terms and conditions to back of the page)
    <?section:force-page-count;'end-on-even-layout'?>
    Error::
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'section' used but not declared.
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:782)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:564)
         ... 15 more
    FYI: I have been using the below link as example
    http://blogs.oracle.com/xmlpublisher/2007/10/here_are_my_terms_conditions.html
    Also reviewed the following link too apart from reading the user guide
    http://winrichman.blogspot.com/search/label/BI%20Publisher%20Last%20page%20continued
    Thanks, Maha

    Hi Maha,
    I have used the <?section:....?> command a few times, and I think it has to be enclosed within a <?for-each@section:.....?> loop. If you are still having issues, then upload your template and sample XML somewhere and I can try to take a look for you.
    Regards,
    Cj

Maybe you are looking for