Re: [java-list] Classe Friend?

2003-06-01 Por tôpico Silvio L. de Morais
Eh algo que falta em Java, na minha opiniao.
Uma classe friend (amiga) eh uma classe que tem acesso a
methods e atributos privados de outra classe.
Ou seja, se a classe A eh amiga da classe B, e 'x' eh um 
atributo int privado em B, a pode fazer algo do tipo:

class A
{
void m1()
{
   B b = new B();
   b.x = 10;
}
}

Isso faz uma falta de vez em quando. Eh uma pena que Java
nao promova a amizade entre as classes :-)

Silvio







--- MARCELO SOUSA LIMA [EMAIL PROTECTED] wrote:
 
 O que é uma classe do tipo Friend?
 
 
 The information contained in this e-mail and in the
 attached files are for the
 exclusive use of the addressee herein nominated, and may
 contain trade secrets,
 privileged and other confidential information,protected
 by the applicable laws.
 In case you  are  not  the  right addressee,  you are
 hereby notified that any 
 reviewing,  reading,  copying and/or distributing of this
 e-mail's  content is 
 strictly prohibited and unauthorized.  Please, delete the
 e-mail's content and 
 notify the sender immediately. 
 Thank you for your cooperation.
 


=


-- LISTA SOUJAVA  
http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP 
dúvidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
historico: http://www.mail-archive.com/java-list%40soujava.org.br
para sair da lista: envie email para [EMAIL PROTECTED] 
-



Re: [java-list] Classe Friend?

2003-06-01 Por tôpico Guilherme Ceschiatti B. Moreira
Oi.

Uma classe Friend é uma classe que possui acesso aos membros privados
dessa outra classe. É uma forma de se quebrar o encapsulamento. Isso
existe em C++.

[]~s
Guilherme Ceschiatti

On Tue, 27 May 2003 16:26:03 -0300, MARCELO SOUSA LIMA
[EMAIL PROTECTED] said:
 
 O que é uma classe do tipo Friend?
 
 
 The information contained in this e-mail and in the attached files are
 for the
 exclusive use of the addressee herein nominated, and may contain trade
 secrets,
 privileged and other confidential information,protected by the applicable
 laws.
 In case you  are  not  the  right addressee,  you are hereby notified
 that any 
 reviewing,  reading,  copying and/or distributing of this e-mail's 
 content is 
 strictly prohibited and unauthorized.  Please, delete the e-mail's
 content and 
 notify the sender immediately. 
 Thank you for your cooperation.
-- 
  Guilherme Ceschiatti B. Moreira
  [EMAIL PROTECTED]

-- LISTA SOUJAVA 
http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP
dúvidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
historico: http://www.mail-archive.com/java-list%40soujava.org.br
para sair da lista: envie email para [EMAIL PROTECTED]
-



Re: [java-list] Classe Friend?

2003-05-31 Por tôpico rgaino




O tipo que existe é FRIENDLY, mas apenas em C++.

No java não existe esse tipo.



Rafael Gaino


  - Original Message - 
  From: 
  MARCELO 
  SOUSA LIMA 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, May 27, 2003 4:26 PM
  Subject: [java-list] Classe Friend?
  
  
  O que é uma classe do tipo 
  Friend?
  


  The information contained in this e-mail and in the attached files are for the
exclusive use of the addressee herein nominated, and may contain trade secrets,
privileged and other confidential information,protected by the applicable laws.
In case you  are  not  the  right addressee,  you are hereby notified that any 
reviewing,  reading,  copying and/or distributing of this e-mail's  content is 
strictly prohibited and unauthorized.  Please, delete the e-mail's content and 
notify the sender immediately. 
Thank you for your cooperation.



[java-list] Classe Friend?

2003-05-29 Por tôpico MARCELO SOUSA LIMA








O que é uma classe do tipo Friend?






The information contained in this e-mail and in the attached files are for the
exclusive use of the addressee herein nominated, and may contain trade secrets,
privileged and other confidential information,protected by the applicable laws.
In case you  are  not  the  right addressee,  you are hereby notified that any 
reviewing,  reading,  copying and/or distributing of this e-mail's  content is 
strictly prohibited and unauthorized.  Please, delete the e-mail's content and 
notify the sender immediately. 
Thank you for your cooperation.